Go to My Blog
Go to Lin's Blog

linux下c/c++的文件操作

opendir,readdir,closedir,

stat()查询文件状态

open(), O_TRUNC这个Flag会把打开的文件清零...

文件锁:fcntl, F_GETLK , F_SETLK:

   http://man7.org/linux/man-pages/man2/fcntl.2.html

   http://blog.chinaunix.net/uid-20775448-id-4009263.html

 

posted @ 2014-08-26 08:13  一ke小小草  阅读(523)  评论(0编辑  收藏  举报