Beispiel #1
0
 public Collection<PathInfo> GetResolvedPSPathFromPSPath(string path)
 {
     var runtime = new ProviderRuntime(_sessionState);
     var res = GetResolvedPSPathFromPSPath(new [] { path }, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }
 public bool Exists(string path, bool force, bool literalPath)
 {
     var runtime = new ProviderRuntime(SessionState, force, literalPath);
     bool result = Exists(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return result;
 }
 public bool HasChild(string path, bool force, bool literalPath)
 {
     var runtime = new ProviderRuntime(SessionState, force, literalPath);
     var res = HasChild(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }
 public bool IsContainer(string path)
 {
     var runtime = new ProviderRuntime(SessionState);
     bool result = IsContainer(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return result;
 }
 public void Invoke(string[] path, bool literalPath)
 {
     var runtime = new ProviderRuntime(SessionState);
     runtime.AvoidGlobbing = literalPath;
     Invoke(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
 }
 public void Remove(string[] path, bool recurse, bool force, bool literalPath)
 {
     var runtime = new ProviderRuntime(SessionState, force, literalPath);
     Remove(path, recurse, runtime);
     runtime.ThrowFirstErrorOrContinue();
 }
 public Collection<PSObject> New(string[] paths, string name, string itemTypeName, object content, bool force)
 {
     // TODO: support globbing (e.g. * in filename)
     Path normalizedPath;
     var runtime = new ProviderRuntime(_cmdlet.ExecutionContext);
     runtime.Force = force;
     foreach (var path in paths)
     {
         var provider = GetContainerProviderByPath(path, name, out normalizedPath);
         provider.NewItem(normalizedPath, itemTypeName, content, runtime);
     }
     runtime.ThrowFirstErrorOrContinue();
     return runtime.RetreiveAllProviderData();
 }
Beispiel #8
0
 public PathInfo SetLocation(string path)
 {
     var runtime = new ProviderRuntime(_sessionState);
     var res = SetLocation(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }
Beispiel #9
0
 public string ParseParent(string path, string root)
 {
     var runtime = new ProviderRuntime(_sessionState);
     var res = ParseParent(path, root, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }
Beispiel #10
0
 public string ParseChildName(string path)
 {
     var runtime = new ProviderRuntime(_sessionState);
     var res = ParseChildName(path, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }
Beispiel #11
0
 public string NormalizeRelativePath(string path, string basePath)
 {
     var runtime = new ProviderRuntime(_sessionState);
     var res = NormalizeRelativePath(path, basePath, runtime);
     runtime.ThrowFirstErrorOrContinue();
     return res;
 }