IronRuby.Builtins.RubyIOOps.Reopen C# (CSharp) Method

Reopen() private static method

private static Reopen ( ConversionStorage toPath, RubyIO io, object pathObj, IronRuby.Builtins.IOInfo info ) : RubyIO
toPath ConversionStorage
io RubyIO
pathObj object
info IronRuby.Builtins.IOInfo
return RubyIO
        private static RubyIO/*!*/ Reopen(ConversionStorage<MutableString>/*!*/ toPath, RubyIO/*!*/ io, object pathObj, IOInfo info) {
            MutableString path = Protocols.CastToPath(toPath, pathObj);
            Stream newStream = RubyFile.OpenFileStream(io.Context, path.ToString(path.Encoding.Encoding), info.Mode);
            io.Context.SetStream(io.GetFileDescriptor(), newStream);
            io.SetStream(newStream);
            io.Mode = info.Mode;

            if (info.HasEncoding) {
                io.ExternalEncoding = info.ExternalEncoding;
                io.InternalEncoding = info.InternalEncoding;
            }

            return io;
        }

Same methods

RubyIOOps::Reopen ( ConversionStorage toPath, RubyIO self, object path, [ mode ) : RubyIO
RubyIOOps::Reopen ( ConversionStorage toPath, RubyIO self, object path, int mode ) : RubyIO
RubyIOOps::Reopen ( RubyIO self, [ source ) : RubyIO