MFT/Mft.cs
/// <summary>
///     Given an MFT entry # and seq #, return the full path
/// </summary>
/// <param name="recordKey"></param>
/// <returns></returns>
Given an MFT entry # and seq #, return the full path
Given an MFT entry # and seq # return the full path
public string GetFullParentPath(string recordKey)
        {
            var stack = new Stack<string>();
            var tempKey = recordKey;
            while (_directoryNameMap.ContainsKey(tempKey))
            {
                var dir = _directoryNameMap[tempKey];
                stack.Push(dir.Name);
                if (tempKey.Equals("00000005-00000005"))
                {
                    break;
                }
                tempKey = dir.ParentRecordKey;
            }
            if (tempKey != "00000005-00000005")
            {
                stack.Push($".\\PathUnknown\\Directory with ID 0x{tempKey}");
            }
            return string.Join("\\", stack);
        }
public string GetFullParentPath ( string recordKey ) { var stack = new Stack < string > ( ) ; var tempKey = recordKey ; while ( _directoryNameMap . ContainsKey ( tempKey ) ) { var dir = _directoryNameMap [ tempKey ] ; stack . Push ( dir . Name ) ; if ( tempKey . Equals ( " " ) ) { break ; } tempKey = dir . ParentRecordKey ; } if ( tempKey != " " ) { stack . Push ( $" . \\ PathUnknown \\ Directory with ID 0x { tempKey } " ) ; } return string . Join ( " \\ " , stack ) ; }
Given an MFT entry # and seq #, return the full path
Given an MFT entry # and seq # return the full path
//all done since we are at root //we dropped out of our map too early, so adjust it
None
recordKey
string
None