Exemple #1
0
        void StartExport(FileInfo[] files, DirectoryInfo[] subDirectories)
        {
            //delete files:
            foreach (System.IO.FileInfo file in files)
            {
                file.Delete();
            }
            //delete directories in this directory:
            foreach (System.IO.DirectoryInfo subDirectory in subDirectories)
            {
                subDirectory.Delete(true);
            }

            _exporter.Export();
            OpenInFileBrowser.Open(Path.GetDirectoryName(ExporterSettings.Export.GetExportPath()));
        }
Exemple #2
0
        void StartExport(FileInfo[] files, DirectoryInfo[] subDirectories, bool openFolder = true)
        {
            if (ExporterSettings.Export.clear || ExporterSettings.Export.folder == Config.DefaultExportFolder)
            {
                //delete files:
                foreach (FileInfo file in files)
                {
                    file.Delete();
                }
                //delete directories in this directory:
                foreach (DirectoryInfo subDirectory in subDirectories)
                {
                    subDirectory.Delete(true);
                }
            }

            _exporter.Export();

            if (openFolder)
            {
                OpenInFileBrowser.Open(Path.GetDirectoryName(ExporterSettings.Export.GetExportPath()));
            }
        }