public MftSegmentReference FindFileNameRecordSegmentReference(string fileName) { byte[] key = FileNameRecord.GetIndexKeyBytes(fileName); KeyValuePair <MftSegmentReference, byte[]>?entry = FindEntry(key); if (entry != null) { return(entry.Value.Key); } else { return(null); } }
public KeyValuePair <MftSegmentReference, FileNameRecord>?FindFileNameRecord(string fileName) { byte[] key = FileNameRecord.GetIndexKeyBytes(fileName); KeyValuePair <MftSegmentReference, byte[]>?entry = FindEntry(key); if (entry != null) { MftSegmentReference fileReference = entry.Value.Key; FileNameRecord fileNameRecord = new FileNameRecord(entry.Value.Value, 0); return(new KeyValuePair <MftSegmentReference, FileNameRecord>(fileReference, fileNameRecord)); } else { return(null); } }
public bool ContainsFileName(string fileName) { byte[] key = FileNameRecord.GetIndexKeyBytes(fileName); return(FindEntry(key) != null); }