词条 | filelength |
释义 | 函数名: filelength 功 能: 取文件长度字节数 用 法: long filelength(int handle); 程序例: #include <string.h> #include <stdio.h> #include <fcntl.h> #include <io.h> int main(void) { int handle; char buf[11] = "0123456789"; /* create a file containing 10 bytes */ handle = open("DUMMY.FIL", O_CREAT); write(handle, buf, strlen(buf)); /* display the size of the file */ printf("file length in bytes: %ld\", filelength(handle)); /* close the file */ close(handle); return 0; } |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。