public void DeleteFile(string path) { path = PathTools.Normalize(path); if (!FileTable.TryOpenFile(path, out SaveFileInfo fileInfo)) { throw new FileNotFoundException(); } if (fileInfo.StartBlock != int.MinValue) { AllocationTable.Free(fileInfo.StartBlock); } FileTable.DeleteFile(path); }
public void DeleteFile(string path) { path = PathTools.Normalize(path); if (!FileTable.TryOpenFile(path, out SaveFileInfo fileInfo)) { ThrowHelper.ThrowResult(ResultFs.PathNotFound); } if (fileInfo.StartBlock != int.MinValue) { AllocationTable.Free(fileInfo.StartBlock); } FileTable.DeleteFile(path); }