public PSShare(FileShareItem share) { this.ResourceGroupName = ParseResourceGroupFromId(share.Id); this.StorageAccountName = ParseStorageAccountNameFromId(share.Id); this.Id = share.Id; this.Name = share.Name; this.Type = share.Type; this.Metadata = share.Metadata; this.Etag = share.Etag; this.LastModifiedTime = share.LastModifiedTime; this.QuotaGiB = share.ShareQuota; this.EnabledProtocols = share.EnabledProtocols; this.RootSquash = share.RootSquash; this.Version = share.Version; this.Deleted = share.Deleted; this.DeletedTime = share.DeletedTime; this.RemainingRetentionDays = share.RemainingRetentionDays; this.EnabledProtocols = share.EnabledProtocols; this.RootSquash = share.RootSquash; this.ShareUsageBytes = share.ShareUsageBytes; this.AccessTier = share.AccessTier; this.AccessTierChangeTime = share.AccessTierChangeTime; this.AccessTierStatus = share.AccessTierStatus; this.SnapshotTime = share.SnapshotTime; }
public PSShare(FileShareItem share) { this.ResourceGroupName = ParseResourceGroupFromId(share.Id); this.StorageAccountName = ParseStorageAccountNameFromId(share.Id); this.Id = share.Id; this.Name = share.Name; this.Type = share.Type; this.Metadata = share.Metadata; this.Etag = share.Etag; this.LastModifiedTime = share.LastModifiedTime; this.QuotaGiB = share.ShareQuota; }
public async Task <IEnumerable <FileShareItem> > GetFilesAndDirectories(string account, string key, string share, string folder) { IEnumerable <IListFileItem> files = await StorageLibrary.File.ListFilesAndDirsAsync(account, key, share, folder); List <FileShareItem> list = new List <FileShareItem>(); files.ToList().ForEach(f => { FileShareItem item = new FileShareItem { Name = f is CloudFileDirectory ? (f as CloudFileDirectory).Name : (f is CloudFile) ? (f as CloudFile).Name : "N/A", Parent = f.Parent.Name, ParentUrl = f.Parent.Uri.AbsoluteUri, Url = f.StorageUri.PrimaryUri.AbsoluteUri, IsDirectory = f is CloudFileDirectory }; list.Add(item); }); list.Sort(); return(list); }