Ejemplo n.º 1
0
        private void CleanupUnusedFiles(FileInfoArray files)
        {
            SetStatus(Properties.Resources.Cleanup);

            var allFiles = Directory.GetFiles(targetDir, "*.*", SearchOption.AllDirectories);
            var toDelete = allFiles.Except(files.Files.Select(i => i.GetFullFileName(targetDir)));

            foreach (var f in toDelete)
            {
                Debug.WriteLine(String.Format(Properties.Resources.Deleting, f));
                File.Delete(f);
            }
        }
Ejemplo n.º 2
0
        private void CleanupUnusedFiles(FileInfoArray files)
        {
            SetStatus(Properties.Resources.Cleanup);

            var allFiles = Directory.GetFiles(targetDir, "*.*", SearchOption.AllDirectories);
            var toDelete = allFiles.Except(files.Files.Select(i => i.GetFullFileName(targetDir)));

            foreach (var f in toDelete)
            {
                Debug.WriteLine(String.Format(Properties.Resources.Deleting, f));
                File.Delete(f);
            }
        }