public static string GetParentDirectoryPath(MFSDisk mfsDisk, MFSEntry file) { string temp = ""; ushort dir_id = 0; MFSDirectory dir = GetDirectoryFromID(mfsDisk, file.ParentDirectory); while (dir != null) { dir_id = dir.ParentDirectory; temp = dir.Name + (dir_id != 0xFFFE ? "/" : "") + temp; dir = GetDirectoryFromID(mfsDisk, dir_id); } return(temp); }
public static string GetFullPath(MFSDisk mfsDisk, MFSEntry file) { string temp = GetParentDirectoryPath(mfsDisk, file) + file.Name; if (file.GetType() == typeof(MFSFile) && ((MFSFile)file).Ext != "") { temp += "." + ((MFSFile)file).Ext; } else if (file.GetType() == typeof(MFSDirectory)) { temp += "/"; } return(temp); }