码农知识堂 - 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());
    };
  • 相关阅读:
    Ubuntu Server CLI专业提示
    代码随想录算法训练营第23期day22|669. 修剪二叉搜索树、108.将有序数组转换为二叉搜索树、538.把二叉搜索树转换为累加树
    Python tkinter--第13章数值调整控件(Spinbox)方法
    Chapter12 : Deep Learning Applied to Ligand-Based De Novo Drug Design
    13009.pycharm搭建python开发环境
    铁威马NAS媒体索引设置教程
    数商云:引领化工业态数字升级,看摩贝如何快速打通全场景互融互通
    数字化底层逻辑揭秘!探寻地产工程行业发展新范式
    03 树莓派QEMU模拟器介绍
    Opengl绘制三角形
  • 原文地址:https://blog.csdn.net/qq_32378713/article/details/126378696
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号