Which StatusInfo fields should have values set when dealing with win32 platform


Does any one have an idea which fields and how to the values correctly of the StatusInfo struct when dealing with the information returned in the BY_HANDLE_FILE_INFORMATION struct (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/by_handle_file_information_str.asp) from windows instead of the unix stuff in getStatusInfo:

--- (excerpt start) -------------
  info.fileSize = buf.st_size;
  info.mode = buf.st_mode;
  info.user = buf.st_uid;
  info.group = buf.st_gid;
  info.isDir = S_ISDIR(buf.st_mode);
  if (info.isDir && path[path.length()-1] != '/')
    path += '/';
--- (excerpt end) -------------

The getStatusInfo is used in the code of gccld and is missing in win32 Path.cpp file.



  Note that you'll need write a "fromWin32Time" for the TimeValue
  class to make the conversion of ftLastWriteTime to TimeValue's
  notion of normalized time.

isDir = dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY;

fileSize = nFileSizeLow + (nFileSizeHigh << sizeof(DWORD)*8);

The mode, user, and group fields aren't applicabe to Win32 so just set
them as follows (to avoid Unix issues):

user = 9999;
group = 9999;
mode = 0777;


I'm implementing this right now. BY_HANDLE_FILE_INFORMATION isn't the correct API, as Path doesn't have an open file handle handy. Nor does it need one.

Reid Spencer wrote:

Okay. Sounds good. Look forward to it.



Reid Spencer wrote: