class FilePath extends GenericPath

Represents an absolute path on the file system, pointing to a file or directory that may or may not exist. Relative paths are interpreted as relative to the current working directory.

This type has a lot of shared API with the VirtualPath abstraction in laika-core via their common super-trait GenericPath. Like the virtual path API it comes with convenience methods for querying and modifying suffix and fragment components, a common requirement in processing internal links for example.

However, it differs in three ways from the virtual path abstraction: first, semantically, as the latter is never intended to represent an actual file and instead just describes a tree structure of inputs (and AST documents after parsing).

Secondly, this type comes with additional APIs to convert to and from other path representations, namely java.io.File, java.nio.file.Path and fs2.io.file.Path.

And finally, the toString method for this type returns a platform-dependent string representation by using the file separator of the underlying file system. Laika's virtual path abstractions on the other hand always uses a forward slash / as the separator.

Having a dedicated file path abstraction also helps with type signatures for methods in Laika's APIs that accept two path arguments: a file path and a virtual path indicating the mount point (at which the specified file is supposed to be inserted into the virtual tree).

Linear Supertypes
GenericPath, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FilePath
  2. GenericPath
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Self = FilePath
    Definition Classes
    FilePathGenericPath

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def /(path: RelativePath): FilePath

    Combines this path with the specified relative path.

    Combines this path with the specified relative path.

    Definition Classes
    FilePathGenericPath
  4. def /(name: String): FilePath

    Creates a new path with the specified name as an immediate child of this path.

    Creates a new path with the specified name as an immediate child of this path.

    Definition Classes
    FilePathGenericPath
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. val basename: String

    The base name of this path, without the suffix (if present).

    The base name of this path, without the suffix (if present).

    Definition Classes
    FilePathGenericPath
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  9. def copyWith(basename: String, suffix: Option[String], fragment: Option[String]): FilePath
    Attributes
    protected
    Definition Classes
    FilePathGenericPath
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(other: Any): Boolean
    Definition Classes
    FilePath → AnyRef → Any
  12. def fragment: Option[String]

    The fragment part of the path (after a # in the last segment), or None if this path does not have a fragment component.

    The fragment part of the path (after a # in the last segment), or None if this path does not have a fragment component.

    Definition Classes
    FilePathGenericPath
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    FilePath → AnyRef → Any
  15. val isAbsolute: Boolean

    Indicates whether this path is absolute.

    Indicates whether this path is absolute. Relative paths are interpreted relative to the current working directory during a transformation.

  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def name: String

    The local name of this path, without the optional fragment part, but including the suffix if present.

    The local name of this path, without the optional fragment part, but including the suffix if present.

    Definition Classes
    FilePathGenericPath
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. def suffix: Option[String]

    The suffix of None if this path name does not have a file suffix separated by a ..

    The suffix of None if this path name does not have a file suffix separated by a ..

    Definition Classes
    FilePathGenericPath
  22. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  23. def toFS2Path: Path

    Converts this FilePath to an fs2.io.file.Path.

  24. def toJavaFile: File

    Converts this FilePath to an java.io.File instance.

  25. def toNioPath: Path

    Converts this FilePath to a java.nio.file.Path.

  26. def toString(): String
    Definition Classes
    FilePath → AnyRef → Any
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  29. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. def withBasename(name: String): Self

    Returns a new path that replaces the base name with the specified new name while keeping both, suffix and fragment, in case they are present.

    Returns a new path that replaces the base name with the specified new name while keeping both, suffix and fragment, in case they are present.

    Definition Classes
    GenericPath
  31. def withFragment(fragment: String): Self

    Returns a new path that either replaces the existing fragment component with the specified one or appends it if this path does not have a component yet.

    Returns a new path that either replaces the existing fragment component with the specified one or appends it if this path does not have a component yet.

    Definition Classes
    GenericPath
  32. def withSuffix(suffix: String): Self

    Returns a new path that either replaces the existing suffix with the specified one or appends it if this path does not have a suffix yet.

    Returns a new path that either replaces the existing suffix with the specified one or appends it if this path does not have a suffix yet.

    Definition Classes
    GenericPath
  33. def withoutFragment: Self

    Returns a new path that discards this path's fragment, if present.

    Returns a new path that discards this path's fragment, if present.

    Definition Classes
    GenericPath
  34. def withoutSuffix: Self

    Returns a new path that discards this path's suffix, if present.

    Returns a new path that discards this path's suffix, if present.

    Definition Classes
    GenericPath

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from GenericPath

Inherited from AnyRef

Inherited from Any

Ungrouped