C語言中stat函數的使用

  函數原型 int stat(const char * file_name,struct stat *buf); 表頭文件: #include<unistd.h> #include<sys/stat.h> stat()用來將參數file_name所指的文件狀態, 複製到參數buf所指的結構中。 const char*表示文件的路徑,struct stat*buf 表示聲明的結構體 stat,ls
相關文章
相關標籤/搜索