protected SeekableByteChannel getFd(String filePath, EnumSet<StandardOpenOption> options) {
    FileChannel fchannel = (FileChannel) fileChannelCache.getObject(filePath);
    if (fchannel == null) {
      // Create parent folders
      Path directories = Paths.get(filePath.substring(0, filePath.lastIndexOf(File.separator)));
      try {
        Files.createDirectories(directories);
      } catch (IOException e) {
        logger.error("Path = {}, Error creating folders = {}", directories, e.toString());
        return null;
      }
      // Create file
      try {
        fchannel = new FileChannel(Files.newByteChannel(Paths.get(filePath), options));
      } catch (IOException e) {
        logger.error("Path = {}, Options = {}, Error creating file = {}", filePath, options, e.toString());
        return null;
      }
      // insert into cache
      fileChannelCache.putObject(filePath, fchannel);
    }
    return fchannel.getSeekableByteChannel();
  }
Returns a cached file-desc or creates a new one
@param filePath File system path
@param options Options to use when opening or creating a file
@return File descriptor
ambry-replication/src/main/java/com/github/ambry/replication/BackupCheckerFileManager.java