Exemple #1
0
        static public AttemptResult Move(this StreamSystem item, string src_path, StreamSystem dst, string dst_path, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            if (item.DoesStreamExist(src_path))
            {
                return(item.MoveStream(src_path, dst, dst_path, overwrite, milliseconds));
            }

            if (item.DoesDirectoryExist(src_path))
            {
                return(item.MoveDirectory(src_path, dst, dst_path, overwrite, milliseconds));
            }

            return(AttemptResult.Failed);
        }
Exemple #2
0
        static public bool DoesExist(this StreamSystem item, string path)
        {
            if (item.DoesStreamExist(path))
            {
                return(true);
            }

            if (item.DoesDirectoryExist(path))
            {
                return(true);
            }

            return(false);
        }
Exemple #3
0
        static public AttemptResult Rename(this StreamSystem item, string path, string new_name, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            if (item.DoesStreamExist(path))
            {
                return(item.RenameStream(path, new_name, overwrite, milliseconds));
            }

            if (item.DoesDirectoryExist(path))
            {
                return(item.RenameDirectory(path, new_name, overwrite, milliseconds));
            }

            return(AttemptResult.Failed);
        }
Exemple #4
0
        static public AttemptResult Delete(this StreamSystem item, string path, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            if (item.DoesStreamExist(path))
            {
                return(item.DeleteStream(path, milliseconds));
            }

            if (item.DoesDirectoryExist(path))
            {
                return(item.DeleteDirectory(path, milliseconds));
            }

            return(AttemptResult.Failed);
        }
Exemple #5
0
 public override bool DoesDirectoryExist(string path)
 {
     return(stream_system.DoesDirectoryExist(CalculatePath(path)));
 }