how to get the size of the file
-
hai everybody I have a problem in retrieving the size of the file.i have to monitor the directory and i have to show the filr name ,file size and date and time of file which is monitored.here i want to know how can i retrieve the size of the file.is there any function which can be used to retrieve that one. If any body knows help me to get it done. :)
-
hai everybody I have a problem in retrieving the size of the file.i have to monitor the directory and i have to show the filr name ,file size and date and time of file which is monitored.here i want to know how can i retrieve the size of the file.is there any function which can be used to retrieve that one. If any body knows help me to get it done. :)
-
hai everybody I have a problem in retrieving the size of the file.i have to monitor the directory and i have to show the filr name ,file size and date and time of file which is monitored.here i want to know how can i retrieve the size of the file.is there any function which can be used to retrieve that one. If any body knows help me to get it done. :)
Do something like that,
int fh = _open("myfile.txt", _O_APPEND , _S_IREAD | _S_IWRITE ); int filesize = _filelength(fh); if (filesize == 0) {do something}
This requires following header files 1. io.h 2. fcntl.h 3. sys\stat.h Good luck We Believe in Excellence www.aqueelmirza.cjb.net -
hai everybody I have a problem in retrieving the size of the file.i have to monitor the directory and i have to show the filr name ,file size and date and time of file which is monitored.here i want to know how can i retrieve the size of the file.is there any function which can be used to retrieve that one. If any body knows help me to get it done. :)
An other approach is to use FindFirstFile, and then the structure WIN32_FIND_DATA is filled with the file size as follows: The size of the file is equal to (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow. both nFileSizeHigh and nFileSizeLow are members of the structure WIN32_FIND_DATA. Yaron Ask not what your application can do for you, Ask what you can do for your application
-
An other approach is to use FindFirstFile, and then the structure WIN32_FIND_DATA is filled with the file size as follows: The size of the file is equal to (nFileSizeHigh * (MAXDWORD+1)) + nFileSizeLow. both nFileSizeHigh and nFileSizeLow are members of the structure WIN32_FIND_DATA. Yaron Ask not what your application can do for you, Ask what you can do for your application