public void SetFileExpiryAbsolute(AdlClient.Models.StoreAccountRef account, FsPath path, System.DateTimeOffset expiretime) { var ut = new FsUnixTime(expiretime); var unix_time = ut.MillisecondsSinceEpoch; this.RestClient.FileSystem.SetFileExpiry(account.Name, path.ToString(), ExpiryOptionType.Absolute, unix_time); }
public FsAcl GetAclStatus(AdlClient.Models.StoreAccountRef account, FsPath path) { var acl_result = this.RestClient.FileSystem.GetAclStatus(account.Name, path.ToString()); var acl_status = acl_result.AclStatus; var fs_acl = new FsAcl(acl_status); return(fs_acl); }
private static void Main(string[] args) { // Setup authentication for this demo var auth = new AdlClient.InteractiveAuthentication("microsoft.onmicrosoft.com"); // change this to YOUR tenant auth.Authenticate(); // Collect info about the Azure resources needed for this demo string subid = "ace74b35-b0de-428b-a1d9-55459d7a6e30"; string rg = "adlclienttest"; string adla_name = "adlclientqa"; string adls_name = "adlclientqa"; // Identify the accounts var adla_account = new AdlClient.Models.AnalyticsAccountRef(subid, rg, adla_name); var adls_account = new AdlClient.Models.StoreAccountRef(subid, rg, adls_name); // Create the clients var az = new AdlClient.AzureClient(auth); var adla = new AdlClient.AnalyticsClient(auth, adla_account); var adls = new AdlClient.StoreClient(auth, adls_account); // ------------------------------ // Run the Demo // ------------------------------ Demo_ListMySubscriptions(az); Demo_ListMyResourceGroups(az); Demo_JobsDetails(adla); Demo_Jobs_GetJobUrl(adla); RunDemos_Job_Summaries(adla); RunDemos_Job_Listing(adla); RunDemos_Catalog(adla); RunDemos_Analytics_Account_Management(adla); RunDemos_FileSystem(adls); RunDemos_Resource_Managementr(az); }
public IEnumerable <FsFileStatusPage> ListFilesPaged(AdlClient.Models.StoreAccountRef account, FsPath path, FileListingParameters parameters) { string after = null; while (true) { var result = RestClient.FileSystem.ListFileStatus(account.Name, path.ToString(), parameters.PageSize, after); if (result.FileStatuses.FileStatus.Count > 0) { var page = new FsFileStatusPage(); page.Path = path; page.FileItems = result.FileStatuses.FileStatus.Select(i => new FsFileStatus(i)).ToList(); yield return(page); after = result.FileStatuses.FileStatus[result.FileStatuses.FileStatus.Count - 1].PathSuffix; } else { break; } } }
public void SetAcl(AdlClient.Models.StoreAccountRef account, FsPath path, IEnumerable <FsAclEntry> entries) { var s = FsAclEntry.EntriesToString(entries); this.RestClient.FileSystem.SetAcl(account.Name, path.ToString(), s); }
public void RemoveDefaultAcl(AdlClient.Models.StoreAccountRef account, FsPath path) { this.RestClient.FileSystem.RemoveDefaultAcl(account.Name, path.ToString()); }
public void SetFileExpiryNever(AdlClient.Models.StoreAccountRef account, FsPath path) { this.RestClient.FileSystem.SetFileExpiry(account.Name, path.ToString(), ExpiryOptionType.NeverExpire, null); }
public void ModifyAclEntries(AdlClient.Models.StoreAccountRef account, FsPath path, FsAclEntry entry) { this.RestClient.FileSystem.ModifyAclEntries(account.Name, path.ToString(), entry.ToString()); }
public void Create(AdlClient.Models.StoreAccountRef account, FsPath path, System.IO.Stream streamContents, FileCreateParameters parameters) { RestClient.FileSystem.Create(account.Name, path.ToString(), streamContents, parameters.Overwrite); }
public FsFileStatus GetFileStatus(AdlClient.Models.StoreAccountRef account, FsPath path) { var info = RestClient.FileSystem.GetFileStatus(account.Name, path.ToString()); return(new FsFileStatus(info.FileStatus)); }
public void Append(AdlClient.Models.StoreAccountRef account, FsFileStatusPage file, System.IO.Stream steamContents) { this.RestClient.FileSystem.Append(account.Name, file.ToString(), steamContents); }
internal FileSystemCommands(AdlClient.Models.StoreAccountRef account, AdlClient.Rest.StoreRestClients restclients) { this.Account = account; this.RestClients = restclients; }
public System.IO.Stream Open(AdlClient.Models.StoreAccountRef account, FsPath path) { return(this.RestClient.FileSystem.Open(account.Name, path.ToString())); }
public void Rename(AdlClient.Models.StoreAccountRef account, FsPath src_path, FsPath dest_path) { this.RestClient.FileSystem.Rename(account.Name, src_path.ToString(), dest_path.ToString()); }
public void SetOwner(AdlClient.Models.StoreAccountRef account, FsPath path, string owner, string group) { this.RestClient.FileSystem.SetOwner(account.Name, path.ToString(), owner, group); }
public ContentSummary GetContentSummary(AdlClient.Models.StoreAccountRef account, FsPath path) { var summary = this.RestClient.FileSystem.GetContentSummary(account.Name, path.ToString()); return(summary.ContentSummary); }
public void SetFileExpiryRelativeToCreationDate(AdlClient.Models.StoreAccountRef account, FsPath path, System.TimeSpan timespan) { this.RestClient.FileSystem.SetFileExpiry(account.Name, path.ToString(), ExpiryOptionType.RelativeToCreationDate, (long)timespan.TotalMilliseconds); }
public System.IO.Stream Open(AdlClient.Models.StoreAccountRef account, FsPath path, long offset, long bytesToRead) { return(this.RestClient.FileSystem.Open(account.Name, path.ToString(), bytesToRead, offset)); }
public void Mkdirs(AdlClient.Models.StoreAccountRef account, FsPath path) { var result = RestClient.FileSystem.Mkdirs(account.Name, path.ToString()); }
public void Concat(AdlClient.Models.StoreAccountRef account, IEnumerable <FsPath> src_paths, FsPath dest_path) { var src_file_strings = src_paths.Select(i => i.ToString()).ToList(); this.RestClient.FileSystem.Concat(account.Name, dest_path.ToString(), src_file_strings); }
public void Delete(AdlClient.Models.StoreAccountRef account, FsPath path, bool recursive) { var result = RestClient.FileSystem.Delete(account.Name, path.ToString(), recursive); }