public void Init() { _folderPath = Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Media"), ShellSettings.DefaultName); _filePath = _folderPath + "\\testfile.txt"; if (Directory.Exists(_folderPath)) { try { Directory.Delete(_folderPath, true); } catch { // happens sometimes } } Directory.CreateDirectory(_folderPath); File.WriteAllText(_filePath, "testfile contents"); var subfolder1 = Path.Combine(_folderPath, "Subfolder1"); Directory.CreateDirectory(subfolder1); File.WriteAllText(Path.Combine(subfolder1, "one.txt"), "one contents"); File.WriteAllText(Path.Combine(subfolder1, "two.txt"), "two contents"); var subsubfolder1 = Path.Combine(subfolder1, "SubSubfolder1"); Directory.CreateDirectory(subsubfolder1); _storageProvider = new FileSystemStorageProvider(new ShellSettings { Name = ShellSettings.DefaultName }); }
public void Init() { _folderPath = Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Media"), "Default"); _filePath = _folderPath + "\\testfile.txt"; Directory.CreateDirectory(_folderPath); File.WriteAllText(_filePath, "testfile contents"); var subfolder1 = Path.Combine(_folderPath, "Subfolder1"); Directory.CreateDirectory(subfolder1); File.WriteAllText(Path.Combine(subfolder1, "one.txt"), "one contents"); File.WriteAllText(Path.Combine(subfolder1, "two.txt"), "two contents"); var subsubfolder1 = Path.Combine(subfolder1, "SubSubfolder1"); Directory.CreateDirectory(subsubfolder1); _storageProvider = new FileSystemStorageProvider(new ShellSettings { Name = "Default" }); }
public StubStorageProvider(ShellSettings settings) { FileSystemStorageProvider = new FileSystemStorageProvider(settings); SavedStreams = new List<string>(); }