예제 #1
0
        public StorageFileSystemTests()
        {
            var configuration = Zongsoft.Options.Configuration.OptionConfiguration.Load(@"\Zongsoft\Zongsoft.Externals.Aliyun\src\Zongsoft.Externals.Aliyun.option");
            var option        = configuration.GetOptionValue("Externals/Aliyun/OSS") as Zongsoft.Externals.Aliyun.Storages.Options.IConfiguration;

            var fileSystem = new StorageFileSystem(option);

            Zongsoft.IO.FileSystem.Providers.Add(fileSystem);
        }
예제 #2
0
 public FormFileManager()
 {
     InitializeComponent();
     _fileStorageService       = FileStorageService.Service;
     _storageFileSystem        = _fileStorageService.FileSystem;
     _fileStorageDBPath        = ConfigSpecificSettings.GetSettingsFolderPath(false);
     treeViewFolders.DrawMode  = TreeViewDrawMode.OwnerDrawAll;
     treeViewFolders.DrawNode += treeViewFolders_DrawNode;
 }
예제 #3
0
 private void openToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         _fileStorageService.Load(_fileStorageDBPath);
         _storageFileSystem = _fileStorageService.FileSystem;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #4
0
 internal StorageFileProvider(StorageFileSystem fileSystem)
 {
     _fileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
 }
예제 #5
0
 private void CreateEmptyFileSystem()
 {
     FileSystem = StorageFileSystem.CreateNewFileSystem();
 }
예제 #6
0
 public void Load(string databaseFilePath)
 {
     FileSystem = StorageFileSystem.LoadFileSystem(databaseFilePath);
 }
예제 #7
0
 public FileStorageService(StorageFileSystem storageFileSystem)
 {
     _storageFileSystem = storageFileSystem;
 }