public DokanError GetFileInformation(string fileName, out FileInformation fileInfo, DokanFileInfo info) { //Console.WriteLine("GetFileInformation: {0}, isDirectory = {1}", fileName, info.IsDirectory); if (fileName == "\\" || info.IsDirectory) { Directory dir = new Directory(fileName); if (!dir.Exists()) { //Console.WriteLine("GetFileInformation: PathNotFound"); fileInfo = new FileInformation(); return DokanError.ErrorPathNotFound; } String name; String path; if (fileName == "\\") { name = "\\"; path = "\\"; } else { name = Util.GetPathFileName(fileName); path = fileName; } fileInfo = new DirectoryItem(name, path, dir.GetSelfINodeIndex()).GetFileInformation(); //Console.WriteLine("GetFileInformation: Success"); return DokanError.ErrorSuccess; } { Directory dir = new Directory(Util.GetPathDirectory(fileName)); if (!dir.Exists()) { fileInfo = new FileInformation(); return DokanError.ErrorPathNotFound; } String name = Util.GetPathFileName(fileName); if (!dir.Contains(name)) { fileInfo = new FileInformation(); return DokanError.ErrorPathNotFound; } fileInfo = dir.GetItemInfo(name).GetFileInformation(); //Console.WriteLine("GetFileInformation: Success"); return DokanError.ErrorSuccess; } }