博客
关于我
unix环境编程 目录操作
阅读量:225 次
发布时间:2019-02-28

本文共 809 字,大约阅读时间需要 2 分钟。

???????POSIX???????????????????????????????????????

1. ??????

  • *mkdir(const char pathname, mode_t mode)

    ?????????0??????-1?

  • *rmdir(const char pathname)

    ??????????0??????-1?

  • **DIR opendir(const char pathname)

    ?????????DIR????????NULL?

  • **struct dirent readdir(DIR dp)

    ???????????????????struct dirent????????NULL?

  • *void rewinddir(DIR dp)

    ?????????????????0??????-1?

  • *int closedir(DIR dp)

    ?????????0??????-1?

  • *int chdir(const char pathname)

    ???????????0??????-1?

  • **char getcwd(char buf, size_t size)

    ?????????????buf??????NULL?

2. ?????????????

????????????????????????

  • ??opendir?????????DIR???
  • ??readdir???????????????
  • ????????????????????
  • 3. ?????

    ??????ls *.txt???????????????????????popen?pclose?????????????????

    4. ?????

    popen?pclose??????????fork??????????????????????

    ?????????????????????????? POSIX ?????

    转载地址:http://lmwp.baihongyu.com/

    你可能感兴趣的文章
    python 利用已有Ner模型进行数据清洗合并
    查看>>
    python 到大数据开发工程师_如何成为一个大数据开发工程师?
    查看>>
    Python 垃圾收集器文档
    查看>>
    python 基于 wordcloud + jieba + matplotlib 生成词云
    查看>>
    Python 基础 - Day 5 Learning Note - 模块 之 标准库:time (1)
    查看>>
    Python 基础语法:None
    查看>>
    Python 基础语法:基本数据类型(一)
    查看>>
    Python 基础语法:基本数据类型(字典)
    查看>>
    Python 基础语法:基本数据类型(集合)
    查看>>
    python 堆排序
    查看>>
    python 复习计划
    查看>>
    Python 多处理 apply_async 永远不会在 Windows 7 上返回结果
    查看>>
    Python 多处理 Numpy 随机
    查看>>
    Python 多处理 >= 125 列表永远不会完成
    查看>>
    Python 多处理:在第一个子错误时中止映射
    查看>>
    Python 多处理不断产生 pythonw.exe 进程而不做任何实际工作
    查看>>
    Python 多处理从不加入
    查看>>
    Python 多处理如何优雅地退出?
    查看>>
    Python 多处理将子进程的标准输出重定向到 Tkinter 文本
    查看>>
    Python 多处理库错误(AttributeError:__exit__)
    查看>>