/// <include file='Doc/Wrappers.xml' path='docs/method[@name="Open"]/*'/> public override PhpStream Open(ref string path, string mode, StreamOpenOptions options, StreamContext context) { StreamAccessOptions accessOptions; if (!ParseMode(mode, options, out accessOptions)) { return(null); } string opened_path; IExternalStream stream = proxy.Open(path, mode, (int)options, out opened_path, null); path = opened_path; return(stream == null ? null : new ExternalStream(stream, this, accessOptions, opened_path, context)); }
/// <summary> /// Creates a new <see cref="ExternalStream"/> with the given proxy object. /// </summary> /// <param name="proxy">Instance of a class derived from <see cref="MarshalByRefObject"/> that should /// serve as a proxy for this <see cref="ExternalStream"/>.</param> /// <param name="openingWrapper">The parent instance.</param> /// <param name="accessOptions">The additional options parsed from the <c>fopen()</c> mode.</param> /// <param name="openedPath">The absolute path to the opened resource.</param> /// <param name="context">The stream context passed to fopen().</param> internal ExternalStream(IExternalStream proxy, StreamWrapper openingWrapper, StreamAccessOptions accessOptions, string openedPath, StreamContext context) : base(openingWrapper, accessOptions, openedPath, context) { this.proxy = proxy; }