static public AttemptResult AttemptReadRandomLine(this StreamSystem item, string path, out string output, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptReadRandomLine(path, out output, RandInt.SOURCE, milliseconds)); }
static public AttemptResult AttemptReadRandomLine(this StreamSystem item, string path, Process <string> process, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptReadRandomLine(path, process, RandInt.SOURCE, milliseconds)); }
static public T ReadRandomLine <T>(this StreamSystem item, string path, Operation <T, string> operation, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.ReadRandomLine <T>(path, operation, RandInt.SOURCE, milliseconds)); }
public StreamSource(string p, StreamSystem ss) { path = p; stream_system = ss; }
static public AttemptResult AttemptReadBytes(this StreamSystem item, string path, out byte[] bytes, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptRead(path, delegate(Stream stream) { return stream.ReadBytes(); }, out bytes, milliseconds)); }
public StreamSystem_PathModifier_Prefix(string p, StreamSystem s) : base(s) { prefix = p; }
static public StreamSystem GetDirectorySystem(this StreamSystem item, string path) { return(new StreamSystem_PathModifier_Directory(path, item)); }
public StreamSystemRelatedStream_ForeignStreamSystem(StreamSystemStream s, StreamSystem ss) : base(s) { foreign_stream_system = ss; }
protected override StreamSystem GetModifiedStreamSystem(StreamSystem input) { return(foreign_stream_system); }
static public AttemptResult AttemptReadIntoStream(this StreamSystem item, string path, Stream destination, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptRead(path, delegate(Stream file_stream) { destination.WriteStream(file_stream); }, milliseconds)); }
static public AttemptResult WriteStreamTo(this StreamSystem item, string path, Stream source, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.Write(path, delegate(Stream file_stream) { file_stream.WriteStream(source); }, milliseconds)); }
static public TimeSpan GetStreamAge(this StreamSystem item, string path) { return(item.GetStreamTimestamp(path).GetAgeFromDate()); }
public StreamSystem_PathModifier_Directory(string d, StreamSystem s) : base(s) { directory = d; }
static public AttemptResult WriteBytes(this StreamSystem item, string path, byte[] bytes, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.Write(path, delegate(Stream stream) { stream.WriteBytes(bytes); }, milliseconds)); }
static public string ReadRandomLine(this StreamSystem item, string path, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.ReadRandomLine(path, RandInt.SOURCE, milliseconds)); }
public StreamSystem_PathModifier(StreamSystem s) { stream_system = s; }
static public AttemptResult AttemptReadRandomLine(this StreamSystem item, string path, Process <string> process, RandIntSource source, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptRead(path, delegate(Stream stream) { process(stream.ReadTextRandomLine(source)); }, milliseconds)); }
public override AttemptResult CopyStreamForeign(string src_path, StreamSystem dst, string dst_path, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(stream_system.CopyStreamForeign(CalculatePath(src_path), dst, dst_path, overwrite, milliseconds)); }
public override void Reset() { last_path = null; last_stream_system = null; }
static public AttemptResult WriteEmpty(this StreamSystem item, string path, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.Write(path, delegate(Stream stream) { }, milliseconds)); }
static public StreamSystem GetPrefixSystem(this StreamSystem item, string prefix) { return(new StreamSystem_PathModifier_Prefix(prefix, item)); }
public StreamDirectory_Root(StreamSystem s) : base("", null) { stream_system = s; }
static public AttemptResult MoveDirectory(this StreamSystem item, string src_path, StreamSystem dst, string dst_path, bool overwrite, long milliseconds = StreamSystem.DEFAULT_WAIT) { if (dst == item) { return(item.MoveDirectoryNative(src_path, dst_path, overwrite, milliseconds)); } return(item.MoveDirectoryForeign(src_path, dst, dst_path, overwrite, milliseconds)); }
static public AttemptResult AttemptReadBytes(this StreamSystem item, string path, Process <byte[]> process, long milliseconds = StreamSystem.DEFAULT_WAIT) { return(item.AttemptRead(path, delegate(Stream stream) { process(stream.ReadBytes()); }, milliseconds)); }