public SimpleStream open_raw( string fname, bool isread, bool isappend, out string reason) { reason = ""; bool isreadonly; string fname1 = this.apply_profile(fname, out isreadonly); if (isreadonly && !isread) { reason = "Readonly directory"; return((SimpleStream)null); } SimpleStream simpleStream = new SimpleStream(); clib.imsg("ss.open {0} ", (object)fname1); if (!simpleStream.open(fname1, isread, isappend, this.current_user, out reason)) { return((SimpleStream)null); } clib.imsg("ss.open WORKED {0} ", (object)fname1); return(simpleStream); }
public static bool send_file(Websvc w, string fname, bool attached) { SimpleStream ss = new SimpleStream(); ss.open(fname, true, false, out string _); return(WebFile.send_file(w, ss, fname, attached, true)); }