{"record":{"id":"0244a6b731f3ece3","repo":"eclipse-vertx/vert.x","slug":"create","errorCode":null,"errorMessage":"create","messagePattern":"create","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/file/impl/FileCache.java","lineNumber":66,"sourceCode":"      cacheDirName = findUniqueDir(fileCacheDir);\n    } else {\n      // the cacheDir will be suffixed a unique id to avoid eavesdropping from other processes/users\n      // also this ensures that if process A deletes cacheDir, it won't affect process B\n      cacheDirName = fileCacheDir + \"-\" + UUID.randomUUID();\n    }\n    File cacheDir = new File(cacheDirName);\n    // Create the cache directory\n    try {\n      if (Utils.isWindows()) {\n        Files.createDirectories(cacheDir.toPath());\n      } else {\n        // for security reasons, cache directory should not be readable/writable from other users\n        // just like \"POSIX mkdtemp(3)\", the created directory should have 0700 permission\n        Set<PosixFilePermission> perms = PosixFilePermissions.fromString(\"rwx------\");\n        Files.createDirectories(cacheDir.toPath(), PosixFilePermissions.asFileAttribute(perms));\n      }\n    } catch (IOException e) {\n      throw new IllegalStateException(FileSystemImpl.getFolderAccessErrorMessage(\"create\", fileCacheDir), e);\n    }\n    return cacheDir;\n  }\n\n  /**\n   * Find a unique directory path. If the base path doesn't exist, return it.\n   * If it exists, append \"-2\", \"-3\", etc. until a non-existing path is found.\n   */\n  private static String findUniqueDir(String basePath) {\n    File baseDir = new File(basePath);\n    if (!baseDir.exists()) {\n      return basePath;\n    }\n    // Directory exists, find a unique suffix\n    int suffix = 2;\n    while (true) {\n      String candidatePath = basePath + \"-\" + suffix;\n      File candidate = new File(candidatePath);","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/file/impl/FileCache.java#L48-L84","documentation":"Wrap of an IOException raised while creating the file cache directory in FileCache.setupCacheDir. The message 'create' is the failing operation label; the actual cause (permissions, disk full, invalid path) is in the exception's cause chain.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/file/impl/FileCache.java:66 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the cause for the real filesystem error","Verify write permission on the configured file cache directory (vertx.cacheDirBase)","Free disk space or choose another cache location"],"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"}