Пример #1
0
        public static StorageRoot CreateStorage(string path, bool createIfNotExists, StorageOptions storageOptions = null)
        {
            var provider = new FileStorgeProvider(path, createIfNotExists);
            var ret      = new StorageRoot(provider, storageOptions);

            return(ret);
        }
Пример #2
0
        public IStorageProvider OpenStorage(Uri uri)
        {
            var folderPath = PathFromUri(uri);

            if (!Directory.Exists(folderPath))
            {
                throw new StorageNotFoundException(new Uri(folderPath));
            }
            var ret = new FileStorgeProvider(folderPath);

            return(ret);
        }