Beispiel #1
0
 public AttemptResult CopyTo(StreamDirectory destination, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT)
 {
     return(GetStreamSystem().Copy(
                GetPath(),
                destination.GetStreamSystem(),
                destination.GetChildPath(GetName()),
                overwrite,
                milliseconds
                ));
 }
Beispiel #2
0
        public AttemptResult MoveTo(StreamDirectory destination, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            AttemptResult result = GetStreamSystem().Move(
                GetPath(),
                destination.GetStreamSystem(),
                destination.GetChildPath(GetName()),
                overwrite,
                milliseconds
                );

            if (result.IsDesired())
            {
                SetParentDirectory(destination);
            }

            return(result);
        }
Beispiel #3
0
 static public StreamDirectory GetDirectory(this StreamDirectory item, string name)
 {
     return(new StreamDirectory(name, item));
 }
Beispiel #4
0
 static public StreamDirectory GetDirectory(this StreamDirectory item, params string[] names)
 {
     return(item.GetDirectory((IEnumerable <string>)names));
 }
Beispiel #5
0
 static public StreamDirectory GetDirectory(this StreamDirectory item, IEnumerable <string> names)
 {
     return(names.Apply(item, (d, n) => d.GetDirectory(n)));
 }
Beispiel #6
0
 public StreamFile(string n, StreamDirectory d) : base(n, d)
 {
 }
Beispiel #7
0
 static public StreamFile GetFile(this StreamDirectory item, string name)
 {
     return(new StreamFile(name, item));
 }
Beispiel #8
0
 public StreamItem(string n, StreamDirectory d)
 {
     SetName(n);
     SetParentDirectory(d);
 }
Beispiel #9
0
 private void SetParentDirectory(StreamDirectory d)
 {
     parent_directory = d;
 }