Exemplo n.º 1
0
        public DownloadBlobsTaskViewModel(string localFolderPath, IStorageBucket bucket)
        {
            _localFolderPath = localFolderPath;
            _bucket          = bucket;

            Text = $"Downloading {bucket.Name}...";
        }
Exemplo n.º 2
0
        public UploadBlobsTaskViewModel(IEnumerable <FileInfo> files, string prefix, IStorageBucket bucket)
        {
            _files  = files;
            _prefix = prefix;
            _bucket = bucket;

            Text = $"Uploading {files.Count()} files...";
        }
Exemplo n.º 3
0
        public DeleteBlobsTaskViewModel(IEnumerable <string> prefixes, IStorageBucket bucket)
        {
            _prefixes = prefixes;
            _bucket   = bucket;

            Text            = $"Deleting {prefixes.Count()} blobs...";
            IsIndeterminate = true;
        }
        public static async Task <IEnumerable <IEntry> > ListAllEntries(this IStorageBucket bucket, string prefix, bool heirarchical)
        {
            var query = new ListQuery
            {
                Heirarchical = heirarchical,
                Prefix       = prefix,
                PageSize     = 2500
            };

            var first = await bucket.ListEntriesAsync(query);

            var all = new List <IEntry>();

            all.AddRange(first.Result);

            while (first.HasNextPage())
            {
                first = await first.GetNextPage();

                all.AddRange(first.Result);
            }

            return(all);
        }
 public BucketViewModel(IStorageBucket bucket)
 {
     NativeBucket = bucket;
     Name         = bucket.Name;
     // LoadCommand = new DelegateCommand(p => Load(), p => _blobs is null);
 }
Exemplo n.º 6
0
 public UploadBlobsTaskViewModel(FileInfo file, string prefix, IStorageBucket bucket) : this(new[] { file }, prefix, bucket)
 {
 }
Exemplo n.º 7
0
 public DeleteBlobsTaskViewModel(string prefix, IStorageBucket bucket) : this(new[] { prefix }, bucket)
 {
 }
Exemplo n.º 8
0
 public S3Directory(string prefix, IStorageBucket s3Bucket)
 {
     Key    = prefix;
     Bucket = s3Bucket;
 }
Exemplo n.º 9
0
 public void DeleteBucket(IStorageBucket bucket)
 {
     // Pretend that the needed code is here.
 }