码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • C++ 17 filesystem


    filesystem

    目录

    filesystem

    Abstract

    How

    Classes

    Classes

    Non-member functions

    Non-member functions

    File types

    Demo


    Abstract

    The Filesystem library provides facilities for performing operations on file systems and their components, such as paths, regular files, and directories.

    Filesystem库提供了对文件系统及其组件(如路径、常规文件和目录)执行操作的工具。

    How

    Classes

    Classes

    Defined in header

    Defined in namespace std::filesystem

    path

    represents a path
    (class)

    filesystem_error

    an exception thrown on file system errors
    (class)

    directory_entry

    a directory entry
    (class)

    directory_iterator

    an iterator to the contents of the directory
    (class)

    recursive_directory_iterator

    an iterator to the contents of a directory and its subdirectories
    (class)

    file_status

    represents file type and permissions
    (class)

    space_info

    information about free and available space on the filesystem
    (class)

    file_type

    the type of a file
    (enum)

    perms

    identifies file system permissions
    (enum)

    perm_options

    specifies semantics of permissions operations
    (enum)

    copy_options

    specifies semantics of copy operations
    (enum)

    directory_options

    options for iterating directory contents
    (enum)

    file_time_type

    represents file time values
    (typedef)

    Non-member functions

    Non-member functions

    Defined in header

    Defined in namespace std::filesystem

    absolute

    composes an absolute path
    (function)

    canonicalweakly_canonical

    composes a canonical path
    (function)

    relativeproximate

    composes a relative path
    (function)

    copy

    copies files or directories
    (function)

    copy_file

    copies file contents
    (function)

    copy_symlink

    copies a symbolic link
    (function)

    create_directorycreate_directories

    creates new directory
    (function)

    create_hard_link

    creates a hard link
    (function)

    create_symlinkcreate_directory_symlink

    creates a symbolic link
    (function)

    current_path

    returns or sets the current working directory
    (function)

    exists

    checks whether path refers to existing file system object
    (function)

    equivalent

    checks whether two paths refer to the same file system object
    (function)

    file_size

    returns the size of a file
    (function)

    hard_link_count

    returns the number of hard links referring to the specific file
    (function)

    last_write_time

    gets or sets the time of the last data modification
    (function)

    permissions

    modifies file access permissions
    (function)

    read_symlink

    obtains the target of a symbolic link
    (function)

    removeremove_all

    removes a file or empty directory
    removes a file or directory and all its contents, recursively
    (function)

    rename

    moves or renames a file or directory
    (function)

    resize_file

    changes the size of a regular file by truncation or zero-fill
    (function)

    space

    determines available free space on the file system
    (function)

    statussymlink_status

    determines file attributes
    determines file attributes, checking the symlink target
    (function)

    temp_directory_path

    returns a directory suitable for temporary files

    File types

    File types

    is_block_file

    checks whether the given path refers to block device
    (function)

    is_character_file

    checks whether the given path refers to a character device
    (function)

    is_directory

    checks whether the given path refers to a directory
    (function)

    is_empty

    checks whether the given path refers to an empty file or directory
    (function)

    is_fifo

    checks whether the given path refers to a named pipe
    (function)

    is_other

    checks whether the argument refers to an other file
    (function)

    is_regular_file

    checks whether the argument refers to a regular file
    (function)

    is_socket

    checks whether the argument refers to a named IPC socket
    (function)

    is_symlink

    checks whether the argument refers to a symbolic link
    (function)

    status_known

    checks whether file status is known
    (function)

    Demo

    sys::path src_dir("F:\\download");//或者const string src_dir = "F:\\download";
    set dir_set;
    for (sys::directory_iterator end, ite(src_dir); ite != end; ++ite)
    {
        if(!is_directory(ite->path()))
            dir_set.insert(ite->path().filename().string());
    };
  • 相关阅读:
    手机上记录的备忘录内容怎么分享到电脑上查看?
    努力打卡 每天学习 不浪费每一天 Day48
    基本数据类型
    RxJava/RxAndroid的操作符使用(二)
    基于Java web的医院分诊管理系统文档
    Zookeeper:实现“通知协调”的 Demo
    一个简单的HTML网页 个人网站设计与实现 HTML+CSS+JavaScript自适应个人相册展示留言博客模板
    Access所有记录中均未找到搜索关键字
    使用mybatis编写Mapper.xml配置文件的时候,sql自动提示不显示且表爆红
    HTML5期末考核大作业:基于Html+Css+javascript的网页制作(化妆品公司网站制作)
  • 原文地址:https://blog.csdn.net/qq_32378713/article/details/126378696
  • 最新文章
  • 【JVM】编译执行与解释执行的区别是什么?JVM 使用哪种方式?
    用 Hashids 优雅解决 C 端自增 ID 暴露问题
    V8引擎 精品漫游指南--Ignition篇(上) 指令 栈帧 槽位 调用约定 内存布局 基础内容
    LLVM Pass快速入门(四):代码插桩
    milkup:桌面端 markdown AI续写和即时渲染
    基于项目工程构建SBOM(软件物料清单)的研究
    鸿蒙应用开发UI基础第二节:鸿蒙应用程序框架核心解析与实操
    .NET 中如何快速实现 List 集合去重?
    扣子Coze实战:从0到1打造抖音+小红书热点监控智能体
    浅谈数据访问层
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号