[NTFS]
[reactos.git] / reactos / drivers / filesystems / ntfs / attrib.c
index ac4d641..675a2d8 100644 (file)
@@ -314,4 +314,22 @@ GetFileNameFromRecord(PFILE_RECORD_HEADER FileRecord, UCHAR NameType)
     return NULL;
 }
 
+PFILENAME_ATTRIBUTE
+GetBestFileNameFromRecord(PFILE_RECORD_HEADER FileRecord)
+{
+    PFILENAME_ATTRIBUTE FileName;
+
+    FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_POSIX);
+    if (FileName == NULL)
+    {
+        FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_WIN32);
+        if (FileName == NULL)
+        {
+            FileName = GetFileNameFromRecord(FileRecord, NTFS_FILE_NAME_DOS);
+        }
+    }
+
+    return FileName;
+}
+
 /* EOF */