博客
关于我
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 多处理库错误(AttributeError:__exit__)
    查看>>
    Python 多处理模块的 .join() 方法到底在做什么?
    查看>>
    python 多线程与GIL
    查看>>
    Python 字符串总结
    查看>>
    python 字符串显示中文_Python字符串开头的b"、u"、r"与中文乱码
    查看>>
    Python 字符串的几种拼装方式
    查看>>
    python 存入数据库bigint_python基础_MySQL的bigint类型
    查看>>
    python 学习 面向对象编程
    查看>>
    Python 安装程序:“写入文件 C:\Python27\pythonw.exe 时出错“
    查看>>
    Python 无法安装包
    查看>>
    Python基础:集合与文件操作
    查看>>
    Python基础:搭建开发环境(1)
    查看>>
    PYTHON基础:如何阅读N个整数,直到#39;
    查看>>
    Python基础:11变量作用域和闭包
    查看>>
    Python基础: with模式和__enter__ 和 __exit__
    查看>>
    Python基础(7)--函数
    查看>>
    Python基础部分-while循环,格式化输出
    查看>>
    Python基础语法与执行脚本的3种方式
    查看>>
    python基础篇(1):type()
    查看>>
    python基础篇(15):闭包
    查看>>