@msdn=http://search.microsoft.com/search/results.aspx?qu=$$$ @pinvoke=http://pinvoke.net/$$$.htm Summary: The GetFileAttributesEx API !!!!C# Signature: [DllImport("kernel32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool GetFileAttributesEx(string lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, IntPtr lpFileInformation); !!!!Alternative C# Signature: [DllImport("kernel32.dll", SetLastError=true, CharSet=CharSet.Unicode)] [return: MarshalAs(UnmanagedType.Bool)] static extern bool GetFileAttributesEx(string lpFileName, GET_FILEEX_INFO_LEVELS fInfoLevelId, out WIN32_FILE_ATTRIBUTE_DATA fileData); !!!!User-Defined Types: [WIN32_FILE_ATTRIBUTE_DATA] [GET_FILEEX_INFO_LEVELS] !!!!Notes: None. !!!!Tips & Tricks: Please add some! !!!!Sample Code: public static bool GetFileAttributesEx(string lpFileName, out WIN32_FILE_ATTRIBUTE_DATA fileData) { return GetFileAttributesEx(lpFileName, GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, out fileData); } WIN32_FILE_ATTRIBUTE_DATA fileData; if (GetFileAttributesEx(path, GET_FILEEX_INFO_LEVELS.GetFileExInfoStandard, out fileData)) { lastAccessTime = GetDateTimeFromFILETIME(fileData.ftLastAccessTime); lastModifiedTime = GetDateTimeFromFILETIME(fileData.ftLastWriteTime); } else { throw new ApplicationException("Unable to obtain details for path " + path); } } !!!!Alternative Managed API: Do you know one? Please contribute it! Documentation: GetFileAttributesEx@msdn on MSDN
Edit kernel32.getfilea...
You do not have permission to change this page. If you feel this is in error, please send feedback with the contact link on the main page.