Exemplo n.º 1
0
        internal sFile RenameFile(string pathFile, string newName)
        {
            sFile  file       = new sFile();
            int    i          = pathFile.LastIndexOf('\\') + 1;
            string folderFile = pathFile.Remove(i);

            foreach (var folder in treeFiles.Keys)
            {
                if (folderFile == folder)
                {
                    file = treeFiles[folder].RenameFile(pathFile, newName);
                    break;
                }
            }
            dat.RenameFile(pathFile, newName);
            if (shouldSave == SaveType.None)
            {
                shouldSave = SaveType.DirTree;
            }
            return(file);
        }