summaryrefslogtreecommitdiff
path: root/zen/FindFilePlus
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:19:49 +0200
commitc8e0e909b4a8d18319fc65434a10dc446434817c (patch)
treeeee91e7d2ce229dd043811eae8f1e2bd78061916 /zen/FindFilePlus
parent5.2 (diff)
downloadFreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.gz
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.tar.bz2
FreeFileSync-c8e0e909b4a8d18319fc65434a10dc446434817c.zip
5.3
Diffstat (limited to 'zen/FindFilePlus')
-rw-r--r--zen/FindFilePlus/find_file_plus.cpp2
-rw-r--r--zen/FindFilePlus/find_file_plus.h16
2 files changed, 9 insertions, 9 deletions
diff --git a/zen/FindFilePlus/find_file_plus.cpp b/zen/FindFilePlus/find_file_plus.cpp
index 46eb956c..ad385668 100644
--- a/zen/FindFilePlus/find_file_plus.cpp
+++ b/zen/FindFilePlus/find_file_plus.cpp
@@ -295,7 +295,7 @@ void FileSearcher::readDirImpl(FileInformation& output) //throw FileError
QueryPolicy::extractFileId(dirInfo, output);
output.creationTime = toFileTime(dirInfo.CreationTime);
- output.lastWriteTime = toFileTime(dirInfo.LastWriteTime);
+ output.lastWriteTime = toFileTime(dirInfo.LastWriteTime); //the similar field "ChangeTime" refers to changes to metadata in addition to write accesses
output.fileSize.QuadPart = dirInfo.EndOfFile.QuadPart;
output.fileAttributes = dirInfo.FileAttributes;
output.shortNameLength = dirInfo.FileNameLength / sizeof(TCHAR); //FileNameLength is in bytes!
diff --git a/zen/FindFilePlus/find_file_plus.h b/zen/FindFilePlus/find_file_plus.h
index 7306c32e..7d03d98b 100644
--- a/zen/FindFilePlus/find_file_plus.h
+++ b/zen/FindFilePlus/find_file_plus.h
@@ -45,7 +45,7 @@ typedef FileSearcher* FindHandle;
DLL_FUNCTION_DECLARATION
FindHandle openDir(const wchar_t* dirname); //returns nullptr on error, call ::GetLastError()
-//note: do NOT place an asterisk at end, e.g. C:\SomeDir\*, as one would do for ::FindFirstFile()
+//note: do NOT place an asterisk at end, e.g. C:\SomeDir\*, as you would do for ::FindFirstFile()
DLL_FUNCTION_DECLARATION
bool readDir(FindHandle hnd, FileInformation& output); //returns false on error or if there are no more files; ::GetLastError() returns ERROR_NO_MORE_FILES in this case
@@ -53,7 +53,7 @@ bool readDir(FindHandle hnd, FileInformation& output); //returns false on error
warning:; this may also return file system implementation dependent error codes like ERROR_NOT_SUPPORTED, ERROR_INVALID_LEVEL,
ect. if "FileIdBothDirectoryInformation" is not supported! We need a fallback:
- sometimes it's *not* sufficient to use fallback for NtQueryDirectoryFile() alone, we need to reset "hDir", since it may be f$ck$d $p by some poor file system layer implementation:
+ sometimes it's *not* sufficient to use fallback for NtQueryDirectoryFile() alone, we need to reset "hDir", since it may be fucked up by some poor file system layer implementation:
- Samba before v3.0.22 (Mar 30, 2006) seems to have a bug which sucessfully returns 128 elements via NtQueryDirectoryFile() and FileIdBothDirectoryInformation,
then fails with STATUS_INVALID_LEVEL. Fallback to FileBothDirectoryInformation will return STATUS_NO_MORE_FILES, even if there *are* more files
- NtQueryDirectoryFile() may *not* respect "restartScan" for some weird Win2000 file system drivers, so we cannot rely on this as a replacement for a "hDir" reset
@@ -69,17 +69,17 @@ void closeDir(FindHandle hnd);
/*----------
|typedefs|
----------*/
-typedef FindHandle (*OpenDirFunc )(const wchar_t* dirname);
-typedef bool (*ReadDirFunc )(FindHandle hnd, FileInformation& dirInfo);
-typedef void (*CloseDirFunc)(FindHandle hnd);
+typedef FindHandle (*FunType_openDir )(const wchar_t* dirname);
+typedef bool (*FunType_readDir )(FindHandle hnd, FileInformation& dirInfo);
+typedef void (*FunType_closeDir)(FindHandle hnd);
/*--------------
|symbol names|
--------------*/
//const pointers ensure internal linkage
-const char openDirFuncName [] = "openDir";
-const char readDirFuncName [] = "readDir";
-const char closeDirFuncName[] = "closeDir";
+const char funName_openDir [] = "openDir";
+const char funName_readDir [] = "readDir";
+const char funName_closeDir[] = "closeDir";
/*---------------
|library names|
bgstack15