Example #1
0
        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);
        }
Example #2
0
        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);
        }