예제 #1
0
        static public AttemptResult Write(this StreamSystem item, string path, AttemptProcess <Stream> process, long milliseconds = StreamSystem.DEFAULT_WAIT)
        {
            Stream        stream;
            AttemptResult result = item.OpenStreamForWriting(path, out stream, milliseconds);

            using (stream)
            {
                if (result.IsDesired())
                {
                    return(process(stream));
                }
            }

            return(result);
        }
예제 #2
0
 public override AttemptResult OpenStreamForWriting(string path, out Stream stream, long milliseconds = StreamSystem.DEFAULT_WAIT)
 {
     return(stream_system.OpenStreamForWriting(CalculatePath(path), out stream, milliseconds));
 }