Beispiel #1
0
        public static void ClearDownloadCache()
        {
            string downloadDir = GetDownloadDirectoryPath();

            if (!String.IsNullOrWhiteSpace(downloadDir) && !FolderService.HasIllegalChars(downloadDir) &&
                Directory.Exists(downloadDir))
            {
                FolderService.Clear(downloadDir);
            }
        }
Beispiel #2
0
        public static bool ClearDownloadCache()
        {
            string downloadDir = GetDownloadDirectoryPath();

            if (String.IsNullOrWhiteSpace(downloadDir) || FolderService.HasIllegalChars(downloadDir) ||
                !Directory.Exists(downloadDir))
            {
                return(false);
            }

            return(FolderService.Clear(downloadDir));
        }