码农知识堂 - 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());
    };
  • 相关阅读:
    [联邦学习TFF]构建自己的联邦学习模型
    【AI】Interesting Applications
    【11.14】Codeforces 刷题
    Spark学习笔记(二)
    机器学习基础:统计量与抽样分布
    OSI网络分层模型
    强化学习------Policy Gradient算法
    零基础看深度学习python代码的基本方法
    http发送和接收图片json文件
    汽车视频智能剪辑解决方案,满足用户对高品质汽车视频的追求
  • 原文地址:https://blog.csdn.net/qq_32378713/article/details/126378696
  • 最新文章
  • 沪漂五周年了:我越来越迷茫了
    Agentic Skill Routing 实战:别再把所有 Skill 塞进 AI Agent 上下文
    MySQL-Seconds_behind_master的精度误差
    [MAF预定义ChatClient中间件-03]CachingChatClient——利用缓存省钱省时间
    AI的至暗历史:从万众期待到被政府撤资,AI的两次死亡徘徊
    Agent OS :五种驯服不确定性的范式
    PortSwigger SQL注入LAB11
    数据库即时编译JIT
    [Begin]AI Learn Data Day 0
    深度学习进阶(二十七)现代 LLM 的核心架构设计其二:SwiGLU
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
小工具 小游戏
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1

京公网安备 11010502049817号