Class NativeFiles

java.lang.Object
dev.vortex.jni.NativeFiles

public final class NativeFiles extends Object
Static utilities for discovering, deleting, and inspecting the metadata of Vortex files on an object store. The caller supplies a Session; its runtime handle is forwarded to the underlying object store.
  • Method Details

    • listFiles

      public static List<String> listFiles(Session session, String uri, Map<String,String> options)
      List all Vortex files reachable under uri.
    • delete

      public static void delete(Session session, String[] uris, Map<String,String> options)
      Delete files at the given URIs. Silently tolerates an empty list.
    • readMetadata

      public static Map<String,byte[]> readMetadata(Session session, String uri, Map<String,String> options)
      Read the user-defined metadata segments written into the Vortex file at uri, as opaque bytes keyed by the names the VortexWriter builder was given. Returns an empty map for a file that carries no metadata.

      This opens the file on its own. Metadata lives in dedicated segments that opening a file does not read by default, so a segment that falls outside the file-tail read costs an extra round trip.

    • readMetadata

      public static Map<String,byte[]> readMetadata(Session session, NativeReadable readable)
      Read the user-defined metadata segments of a Vortex file through a caller-provided NativeReadable, instead of a native storage client. See readMetadata(Session, String, Map).

      The readable must stay open for the duration of the call; native code never closes it.

      NativeReadable.name() keys the file in the session's footer cache, exactly as it does when the readable is scanned, so reading metadata and then scanning the same file share one footer read.