Пример #1
0
        public async Task Traverse()
        {
            var scope = await GetScopeAsync();

            var storage = scope.Get <IStorage <TSettings> >();

            Assert.NotNull(storage);

            StorageItem  uploaded;
            const string fileName = "file.txt";
            var          metaData = new FileMetaData();

            await using (var file = File.Open("Data/file.txt", FileMode.Open))
            {
                uploaded = await storage.SaveAsync(file, fileName, "upload/dir1/dir2", metaData);
            }

            Assert.NotNull(uploaded);

            await CheckFoldersContent(storage, uploaded, metaData);
        }