示例#1
0
        private async Task CleanupDropbox()
        {
            if (!Directory.Exists(DestDir))
            {
                throw new Exception("Destination directory not available");
            }

            var dropboxDirs = ScanHelper.GetDropboxDirectories(path: SourceDir, keyword: Keyword, excludeEmpty: true);

            foreach (var dir in dropboxDirs)
            {
                ScanHelper.CopyDirectory(dir.FullName, Path.Combine(DestDir, dir.Name), true);
                dir.Attributes = FileAttributes.Normal;
                dir.Delete(true);
            }
        }