Package land.oras

Class LocalPath

java.lang.Object
land.oras.LocalPath

@NullMarked public class LocalPath extends Object
Local path
  • Method Details

    • of

      public static LocalPath of(Path path)
      New local path with no media type
      Parameters:
      path - The path
      Returns:
      The local path
    • of

      public static LocalPath of(Path path, String mediaType)
      New path with no media type
      Parameters:
      path - The path
      mediaType - The media type
      Returns:
      The local path
    • of

      public static LocalPath of(String expression)
      New path with path:mediaType (for example /path/to/file.json:application/json)
      Parameters:
      expression - The expression
      Returns:
      The local path
    • getMediaType

      public String getMediaType()
      Get the media type or default depending on directory or standard file
      Returns:
      The media type
    • getPath

      public Path getPath()
      Get the path
      Returns:
      The path
    • toString

      public String toString()
      Overrides:
      toString in class Object