{"record":{"id":"2f4dd7c2446fb012","repo":"eclipse-vertx/vert.x","slug":"open","errorCode":null,"errorMessage":"open","messagePattern":"open","errorType":"exception","errorClass":"FileSystemException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java","lineNumber":102,"sourceCode":"    if (options.isRead()) opts.add(StandardOpenOption.READ);\n    if (options.isWrite()) opts.add(StandardOpenOption.WRITE);\n    if (options.isCreate()) opts.add(StandardOpenOption.CREATE);\n    if (options.isCreateNew()) opts.add(StandardOpenOption.CREATE_NEW);\n    if (options.isSync()) opts.add(StandardOpenOption.SYNC);\n    if (options.isDsync()) opts.add(StandardOpenOption.DSYNC);\n    if (options.isDeleteOnClose()) opts.add(StandardOpenOption.DELETE_ON_CLOSE);\n    if (options.isSparse()) opts.add(StandardOpenOption.SPARSE);\n    if (options.isTruncateExisting()) opts.add(StandardOpenOption.TRUNCATE_EXISTING);\n    try {\n      if (options.getPerms() != null) {\n        FileAttribute<?> attrs = PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString(options.getPerms()));\n        ch = AsynchronousFileChannel.open(file, opts, vertx.workerPool().executor(), attrs);\n      } else {\n        ch = AsynchronousFileChannel.open(file, opts, vertx.workerPool().executor());\n      }\n      if (options.isAppend()) writePos = ch.size();\n    } catch (IOException e) {\n      throw new FileSystemException(FileSystemImpl.getFileAccessErrorMessage(\"open\", path), e);\n    }\n    this.context = context;\n    this.queue = new InboundBuffer<>(context, 0);\n    queue.handler(buff -> {\n      if (buff.length() > 0) {\n        handleBuffer(buff);\n      } else {\n        handleEnd();\n      }\n    });\n    queue.drainHandler(v -> {\n      doRead();\n    });\n  }\n\n  @Override\n  public Future<Void> close() {\n    Promise<Void> promise = context.promise();","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java#L84-L120","documentation":"Wrap of an IOException raised while opening a file with the computed OpenOptions in AsyncFileImpl's constructor path. The message 'open' is the failing operation label; the underlying cause carries the real filesystem error (missing file, permissions, invalid flags combination).","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/file/impl/AsyncFileImpl.java:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the cause of the thrown exception for the actual reason","Ensure the file exists and OpenOptions (create/createNew/read/write/truncate) are consistent","Check filesystem permissions for the vert.x process"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}