示例#1
0
        public virtual AttemptResult CopyDirectoryForeign(string src_path, StreamSystem dst, string dst_path, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            if (dst.CreateDirectory(dst_path, milliseconds).IsDesired())
            {
                AttemptResult result = AttemptResult.Succeeded;

                result = GetStreamNames(src_path).Apply(result,
                                                        (r, n) => r.GetAbsorbed(
                                                            CopyStreamForeign(
                                                                Filename.ForwardCombine(src_path, n),
                                                                dst,
                                                                Filename.ForwardCombine(dst_path, n),
                                                                overwrite,
                                                                milliseconds
                                                                )
                                                            )
                                                        );

                result = GetDirectoryNames(src_path).Apply(result,
                                                           (r, n) => r.GetAbsorbed(
                                                               CopyDirectoryForeign(
                                                                   Filename.ForwardCombine(src_path, n),
                                                                   dst,
                                                                   Filename.ForwardCombine(dst_path, n),
                                                                   overwrite,
                                                                   milliseconds
                                                                   )
                                                               )
                                                           );

                return(result);
            }

            return(AttemptResult.Failed);
        }
示例#2
0
 public override AttemptResult CreateDirectory(string path, long milliseconds = StreamSystem.DEFAULT_WAIT)
 {
     return(stream_system.CreateDirectory(CalculatePath(path), milliseconds));
 }