void DeleteFiles(Storage storage, string directoryPath) { foreach (var filename in storage.GetFileNames(directoryPath + "*")) { storage.DeleteFile(directoryPath + filename); } }
public IsolatedStorageDirectory_Tests() { storage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly(); foreach (var filename in storage.GetFileNames("*")) { storage.DeleteFile(filename); } }
public IsolatedStorageDirectory_Tests() { storage = System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForAssembly(); foreach (var filename in storage.GetFileNames()) { storage.DeleteFile(filename); } }
protected virtual bool IsolatedStorageExists(string fileName) { fileName = System.IO.Path.GetFileName(fileName).ToLower(); using (System.IO.IsolatedStorage.IsolatedStorageFile l_Storage = GetStorage()) { string[] files = l_Storage.GetFileNames("*"); for (int i = 0; i < files.Length; i++) { string fileFinded = System.IO.Path.GetFileName(files[i]).ToLower(); if (fileFinded == fileName) { return(true); } } l_Storage.Close(); } return(false); }
public IEnumerable <IFile> GetFiles(string searchPattern, SearchOption searchOption) { return(storage.GetFileNames(searchPattern) .Select(filename => new IsolatedStorageFile(GetAbsolutePath(filename), storage, this))); }