public void SetProperty(string path, PSObject propertyValue) { if (PathResolver.IsLocalPath(path)) { return; } var parts = PathResolver.SplitPath(path); if (parts.Count == 0) { return; } //if the provider is not mounted, then create it first var drive = GetDrive(parts[0]); if (drive == null) { return; } //delegate it drive.SetProperty(PathResolver.GetSubpath(path), propertyValue); }
public void GetProperty(string path, System.Collections.ObjectModel.Collection <string> providerSpecificPickList) { if (PathResolver.IsLocalPath(path)) { return; } var parts = PathResolver.SplitPath(path); if (parts.Count == 0) { return; } //if the provider is not mounted, then create it first var drive = GetDrive(parts[0]); if (drive == null) { return; } //delegate it drive.GetProperty(PathResolver.GetSubpath(path), providerSpecificPickList); }
public IContentReader GetContentReader(string path) { if (PathResolver.IsLocalPath(path)) { return(null); } var parts = PathResolver.SplitPath(path); if (parts.Count == 0) { return(null); } //if the provider is not mounted, then create it first var drive = GetDrive(parts[0]); if (drive == null) { return(null); } //delegate it return(drive.GetContentReader(PathResolver.GetSubpath(path))); }
protected override bool ItemExists(string path) { if (PathResolver.IsLocalPath(path)) { return(true); } var parts = PathResolver.SplitPath(path); if (parts.Count == 0) { return(true); } //if the provider is not mounted, then create it first var drive = GetDrive(parts[0]); if (drive == null) { return(false); } //delegate it return(drive.ItemExists(PathResolver.GetSubpath(path))); }
public override bool ItemExists(string path) { if (PathResolver.IsLocalPath(path)) { path = PathResolver.ConvertToRealLocalPath(path); return(File.Exists(path) || Directory.Exists(path)); } try { var r = AzureFilePathResolver.ResolvePath(this.Client, path, skipCheckExistence: false); var exists = r.Exists(); return(exists); } catch (Exception) { return(false); } }
public override bool IsItemContainer(string path) { if (PathResolver.IsLocalPath(path)) { return(true); } var parts = PathResolver.SplitPath(path); if (parts.Count == 0) { return(true); } try { var r = AzureFilePathResolver.ResolvePath(this.Client, path, hint: PathType.AzureFileDirectory, skipCheckExistence: false); return(r.Exists()); } catch (Exception) { return(false); } }