private void MoveDirectory(string directoryPath, MoveContext context) { foreach (string filePath in TexoDirectory.GetFiles(directoryPath)) { MoveFile(filePath, context); } if (context.Preview || !TexoDirectory.IsEmpty(directoryPath)) { return; } Directory.Delete(directoryPath); }
private void DeleteDirectory(string directoryPath, DeleteContext context) { foreach (string filePath in TexoDirectory.GetFiles(directoryPath)) { DeleteFile(filePath, context); } if (context.Preview || !TexoDirectory.IsEmpty(directoryPath)) { return; } context.DeletedFolders.Add(directoryPath.GetFriendlyPath(context.SourceLobby)); ProcessDirectoryDelete(directoryPath); }