/** * @deprecated use {@link #openChannel(int, int)} instead * * @param flags * @param perm * @return channel * @throws ResourceException */ default Channel openChannel(ModeFlags flags, int perm) throws ResourceException { try { return openChannel(flags.getFlags(), perm); } catch (ResourceException ex) { throw ex; } catch (IOException ex) { throw new ResourceException.IOError(ex); } }
/** * @deprecated use {@link #openChannel(int, int)} instead * * @param flags * @param perm * @return channel * @throws ResourceException */ default Channel openChannel(ModeFlags flags, int perm) throws ResourceException { try { return openChannel(flags.getFlags(), perm); } catch (ResourceException ex) { throw ex; } catch (IOException ex) { throw new ResourceException.IOError(ex); } }
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 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(); } }
final ModeFlags modeFlags = ModeFlags.createModeFlags(flags); if (posix.isNative() && !Platform.IS_WINDOWS) { int fd = posix.open(absolutePath(), modeFlags.getFlags(), perm); if (fd < 0) throwFromErrno(posix.errno()); posix.fcntlInt(fd, Fcntl.F_SETFD, posix.fcntl(fd, Fcntl.F_GETFD) | FcntlLibrary.FD_CLOEXEC);
final ModeFlags modeFlags = ModeFlags.createModeFlags(flags); if (posix.isNative() && !Platform.IS_WINDOWS) { int fd = posix.open(absolutePath(), modeFlags.getFlags(), perm); if (fd < 0) throwFromErrno(posix.errno()); posix.fcntlInt(fd, Fcntl.F_SETFD, posix.fcntl(fd, Fcntl.F_GETFD) | FcntlLibrary.FD_CLOEXEC);
EncodingUtils.extractModeEncoding(context, this, pm, opt, oflags_p, fmode_p); oflags_p[0] = descriptor.getOriginalModes().getFlags();
EncodingUtils.extractModeEncoding(context, this, pm, opt, oflags_p, fmode_p); oflags_p[0] = descriptor.getOriginalModes().getFlags();