I'm working on a C application which is running on HP-Nonstop and it needs to get the size of files on disk. The already implemented way of doing that is the following:
char *filename;
short itemlist;
long fileLength = 0;
short retCode;
itemlist = 142; /* file size */
retCode = FILE_GETINFOLISTBYNAME_( filename,
(short)strlen(filename),
&itemlist,
1,
(short*)&fileLength,
sizeof(fileLength) );
As I read in the documentation this only works for files of size not greater than about 2GB:
If the file being referenced is an [...] OSS files larger than approximately 2 gigabytes, item codes will return -1 with no error indication.
Thus my questions:
- How can I obtain the size of files bigger than 2GB?
- Is there a way to have a look into how
FILE_GETINFOLISTBYNAME_
is implemented? Maybe one could write their own implementation for large files.