bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Win32/ls -i : Inode number is zero ...


From: Vardhan Varma
Subject: Win32/ls -i : Inode number is zero ...
Date: Thu, 21 Feb 2002 17:46:25 +0530

C:\>ls --version
ls (GNU fileutils) 3.16

 On Win32 inode number IS available, and called FRN (??)
Hoping this can be added to Native Win32 port ...

BOOL FRNFromPath(LPCTSTR pszPath, DWORDLONG *pFRN) {
   HANDLE hdir = CreateFile(pszPath, 0, FILE_SHARE_READ | FILE_SHARE_WRITE,
                            NULL, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS,

                            NULL);
   if (hdir == INVALID_HANDLE_VALUE)
      return(FALSE);   BY_HANDLE_FILE_INFORMATION fi;
   GetFileInformationByHandle(hdir, &fi);
   CloseHandle(hdir);   // Fill in the FRN
   *pFRN = (((DWORDLONG) fi.nFileIndexHigh) > 32) | fi.nFileIndexLow; 
   return(TRUE);
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]