@Deprecated public POpenProcess(Process child, Ruby runtime, IOOptions modes) { this(child, runtime, modes.getModeFlags()); }
@Deprecated public POpenProcess(Process child, Ruby runtime, IOOptions modes) { this(child, runtime, modes.getModeFlags()); }
@Deprecated public POpenProcess(Process child, Ruby runtime, IOOptions modes) { this(child, runtime, modes.getModeFlags()); }
@Deprecated public POpenProcess(Process child, Ruby runtime, IOOptions modes) { this(child, runtime, modes.getModeFlags()); }
@Deprecated public RubyIO(Ruby runtime, RubyClass cls, ShellLauncher.POpenProcess process, RubyHash options, IOOptions ioOptions) { super(runtime, cls); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), options, ioOptions); openFile = MakeOpenFile(); setupPopen(runtime, ioOptions.getModeFlags(), process); }
@Deprecated public RubyIO(Ruby runtime, RubyClass cls, ShellLauncher.POpenProcess process, RubyHash options, IOOptions ioOptions) { super(runtime, cls); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), options, ioOptions); openFile = MakeOpenFile(); setupPopen(runtime, ioOptions.getModeFlags(), process); }
@Deprecated public RubyIO(Ruby runtime, RubyClass cls, ShellLauncher.POpenProcess process, RubyHash options, IOOptions ioOptions) { super(runtime, cls); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), (RubyHash) options, ioOptions); openFile = new OpenFile(); setupPopen(ioOptions.getModeFlags(), process); }
protected void openInternal(String path, String modeString) { if (path.startsWith("jar:")) { path = path.substring(4); } MakeOpenFile(); IOOptions modes = newIOOptions(getRuntime(), modeString); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); if (getRuntime().is1_9() && modes.getModeFlags().isBinary()) enc = ASCIIEncoding.INSTANCE; openFile.setPath(path); openFile.setMainStream(fopen(path, modes.getModeFlags())); }
@Deprecated public RubyIO(Ruby runtime, RubyClass cls, ShellLauncher.POpenProcess process, RubyHash options, IOOptions ioOptions) { super(runtime, cls); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), (RubyHash) options, ioOptions); openFile = new OpenFile(); setupPopen(ioOptions.getModeFlags(), process); }
protected void openInternal(String path, String modeString) { if (path.startsWith("jar:")) { path = path.substring(4); } MakeOpenFile(); IOOptions modes = newIOOptions(getRuntime(), modeString); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); if (getRuntime().is1_9() && modes.getModeFlags().isBinary()) enc = ASCIIEncoding.INSTANCE; openFile.setPath(path); openFile.setMainStream(fopen(path, modes.getModeFlags())); }
private void initializeOpen(IOOptions ioOptions) { getRuntime().getPosix().chmod(path, 0600); MakeOpenFile(); openFile.setMode(ioOptions.getModeFlags().getOpenFileFlags()); openFile.setPath(path); sysopenInternal19(path, ioOptions.getModeFlags().getOpenFileFlags(), 0600); }
private void initializeOpen(IOOptions ioOptions) { getRuntime().getPosix().chmod(path, 0600); MakeOpenFile(); openFile.setMode(ioOptions.getModeFlags().getOpenFileFlags()); openFile.setPath(path); sysopenInternal19(path, ioOptions.getModeFlags().getOpenFileFlags(), 0600); }
public static IOOptions newIOOptions(Ruby runtime, IOOptions oldFlags, int orOflags) { try { return new IOOptions(new ModeFlags(oldFlags.getModeFlags().getFlags() | orOflags)); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError(); } }
public static IOOptions newIOOptions(Ruby runtime, IOOptions oldFlags, int orOflags) { try { return new IOOptions(new ModeFlags(oldFlags.getModeFlags().getFlags() | orOflags)); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError(); } }
public RubyIO(Ruby runtime, ShellLauncher.POpenProcess process, IOOptions ioOptions) { super(runtime, runtime.getIO()); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), null, ioOptions); openFile = MakeOpenFile(); setupPopen(runtime, ioOptions.getModeFlags(), process); }
public static IOOptions newIOOptions(Ruby runtime, IOOptions oldFlags, int orOflags) { try { return new IOOptions(new ModeFlags(oldFlags.getModeFlags().getFlags() | orOflags)); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError(); } }
public RubyIO(Ruby runtime, ShellLauncher.POpenProcess process, IOOptions ioOptions) { super(runtime, runtime.getIO()); ioOptions = updateIOOptionsFromOptions(runtime.getCurrentContext(), null, ioOptions); openFile = MakeOpenFile(); setupPopen(runtime, ioOptions.getModeFlags(), process); }
public static IOOptions newIOOptions(Ruby runtime, IOOptions oldFlags, int orOflags) { try { return new IOOptions(new ModeFlags(oldFlags.getModeFlags().getFlags() | orOflags)); } catch (InvalidValueException ive) { throw runtime.newErrnoEINVALError(); } }
private IRubyObject openFile(IRubyObject args[]) { Ruby runtime = getRuntime(); RubyString filename = get_path(runtime.getCurrentContext(), args[0]); path = adjustRootPathOnWindows(runtime, filename.asJavaString(), runtime.getCurrentDirectory()); String modeString; IOOptions modes; int perm; if ((args.length > 1 && args[1] instanceof RubyFixnum) || (args.length > 2 && !args[2].isNil())) { modes = parseIOOptions(args[1]); perm = getFilePermissions(args); MakeOpenFile(); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); openFile.setPath(path); sysopenInternal(path, modes.getModeFlags(), perm); } else { modeString = "r"; if (args.length > 1 && !args[1].isNil()) { modeString = args[1].convertToString().toString(); } openInternal(path, modeString); } return this; }
private IRubyObject openFile(IRubyObject args[]) { Ruby runtime = getRuntime(); RubyString filename = get_path(runtime.getCurrentContext(), args[0]); path = adjustRootPathOnWindows(runtime, filename.asJavaString(), runtime.getCurrentDirectory()); String modeString; IOOptions modes; int perm; if ((args.length > 1 && args[1] instanceof RubyFixnum) || (args.length > 2 && !args[2].isNil())) { modes = parseIOOptions(args[1]); perm = getFilePermissions(args); MakeOpenFile(); openFile.setMode(modes.getModeFlags().getOpenFileFlags()); openFile.setPath(path); sysopenInternal(path, modes.getModeFlags(), perm); } else { modeString = "r"; if (args.length > 1 && !args[1].isNil()) { modeString = args[1].convertToString().toString(); } openInternal(path, modeString); } return this; }