当前位置: 首页>>代码示例>>C++>>正文


C++ file_status::type方法代码示例

本文整理汇总了C++中file_status::type方法的典型用法代码示例。如果您正苦于以下问题:C++ file_status::type方法的具体用法?C++ file_status::type怎么用?C++ file_status::type使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在file_status的用法示例。


在下文中一共展示了file_status::type方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main

int main() {
 using namespace fs;
  // Default ctor
  {
    static_assert(std::is_nothrow_default_constructible<file_status>::value,
                  "The default constructor must be noexcept");
    static_assert(test_convertible<file_status>(),
                  "The default constructor must not be explicit");
    const file_status f;
    assert(f.type()  == file_type::none);
    assert(f.permissions() == perms::unknown);
  }

  // Unary ctor
  {
    static_assert(std::is_nothrow_constructible<file_status, file_type>::value,
                  "This constructor must be noexcept");
    static_assert(!test_convertible<file_status, file_type>(),
                 "This constructor must be explicit");

    const file_status f(file_type::not_found);
    assert(f.type()  == file_type::not_found);
    assert(f.permissions() == perms::unknown);
  }
  // Binary ctor
  {
    static_assert(std::is_nothrow_constructible<file_status, file_type, perms>::value,
                  "This constructor must be noexcept");
    static_assert(!test_convertible<file_status, file_type, perms>(),
                  "This constructor must b explicit");
    const file_status f(file_type::regular, perms::owner_read);
    assert(f.type()  == file_type::regular);
    assert(f.permissions() == perms::owner_read);
  }
}
开发者ID:MIPS,项目名称:external-libcxx,代码行数:35,代码来源:file_status.cons.pass.cpp

示例2: type_present

 inline bool type_present(file_status f) { return f.type() != status_error; }
开发者ID:111304037,项目名称:FreeJudger,代码行数:1,代码来源:operations.hpp

示例3: status_known

 inline bool status_known( file_status f ) { return f.type() != status_unknown; }
开发者ID:ht101996,项目名称:MyProjects,代码行数:1,代码来源:operations.hpp

示例4: exists

 inline bool exists( file_status f )       { return f.type() != status_unknown && f.type() != file_not_found; }
开发者ID:ht101996,项目名称:MyProjects,代码行数:1,代码来源:operations.hpp

示例5: status_known

 inline bool status_known(file_status f) { return f.type() != status_error; }
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:1,代码来源:operations.hpp

示例6: exists

 inline bool exists(file_status s) noexcept
 { return status_known(s) && s.type() != file_type::not_found; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例7: status_known

 inline bool status_known(file_status s) noexcept
 { return s.type() != file_type::none; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例8: is_symlink

 inline bool is_symlink(file_status f)   { return f.type() == symlink_file; }
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:1,代码来源:operations.hpp

示例9: is_socket

 inline bool is_socket(file_status s) noexcept
 { return s.type() == file_type::socket; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例10: is_symlink

 inline bool is_symlink(file_status s) noexcept
 { return s.type() == file_type::symlink; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例11: is_fifo

 inline bool is_fifo(file_status s) noexcept
 { return s.type() == file_type::fifo; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例12: is_character_file

 inline bool is_character_file(file_status s) noexcept
 { return s.type() == file_type::character; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例13: is_block_file

 inline bool is_block_file(file_status s) noexcept
 { return s.type() == file_type::block; }
开发者ID:efcs,项目名称:elib,代码行数:2,代码来源:operations.hpp

示例14: exists

 inline bool exists(file_status f)       { return f.type() != status_error
                                               && f.type() != file_not_found; }
开发者ID:Alexander--,项目名称:Wesnoth-1.8-for-Android,代码行数:2,代码来源:operations.hpp

示例15: type

 bool operator==(const file_status& rhs) const { return type() == rhs.type() && 
                                                 permissions() == rhs.permissions(); }
开发者ID:OggYiu,项目名称:rag-engine,代码行数:2,代码来源:operations.hpp


注:本文中的file_status::type方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。