new FileAttribute<?>[0]);
setModeNoPosix(path, mode);
}
} catch (IOException ioe) {
throw new NodeOSException(getErrorCode(ioe), ioe, pathStr);
}
}
try {
FileHandle fileHandle = new FileHandle(path, file);
// Replace this if we choose to support "lchmod"
/*
if ((flags & Constants.O_SYMLINK) != 0) {
fileHandle.noFollow = true;
}
*/
int fd = nextFd.getAndIncrement();
if (log.isDebugEnabled()) {
log.debug(" open({}) = {}", pathStr, fd);
}
if (((flags & Constants.O_APPEND) != 0) && (file != null) && (file.size() > 0)) {
if (log.isDebugEnabled()) {
log.debug(" setting file position to {}", file.size());
}
fileHandle.position = file.size();
}
descriptors.put(fd, fileHandle);
return new Object [] { Context.getUndefinedValue(), fd };
} catch (IOException ioe) {
throw new NodeOSException(getErrorCode(ioe), ioe, pathStr);
}
}