Merges lstat_sync() and filephy() in Windows reduce syscalls.

This commit is contained in:
Andrea Mazzoleni 2014-10-14 22:47:21 +02:00
parent 0388c250f9
commit 55006d76f3
4 changed files with 83 additions and 64 deletions

View file

@ -185,7 +185,8 @@ int windows_rmdir(const char* file);
/**
* Like the C lstat(), but with some limitations.
*
* This call fills all the st_* fields of the stat struct.
* This call fills all the st_* fields of the stat struct,
* and if provided the pointer, also the physical offset.
*
* It doesn't work for all kinds of files and directories.
* You must call it only for regular files.
@ -194,7 +195,7 @@ int windows_rmdir(const char* file);
* Note that instead lstat() works for all the files.
*/
#define HAVE_LSTAT_SYNC 1
int lstat_sync(const char* file, struct windows_stat* st);
int lstat_sync(const char* file, struct windows_stat* st, uint64_t* physical);
/**
* Like the C ftruncate().