Packages

trait Path extends AnyRef

Open trait for path abstraction.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Path
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def fileName: Option[String]

    Returns name of the file pointed by this path.

    Returns name of the file pointed by this path.

    Examples:
    1. Given path pointing to a local file in /root/dir1/dir2/file with root == "root": val p: Path = ??? p.fileName == Some("file")

    2. ,
    3. File 'gs://bucket/this/is/flat/name/' in underlying storage has flat name "this/is/flat/name/". This would be represented as Path: val p: Path = ??? p.pathFromRoot == List("this", "is", "flat", "name") p.fileName == None p.isDir == Some(true)

    Note

    Some blob stores (s3, gcs) having flat namespaces allow trailing slashes in file names.

    See also

    isDir

  2. abstract def isDir: Option[Boolean]

    If known returns true if path points to a directory, otherwise – false.

    If known returns true if path points to a directory, otherwise – false. It's not always possible to know from string representation whether path points to directory or file ending with trailing slash. Paths returned by blobstore.Store.list must have this field defined.

    Examples:
    1. Given path pointing to a local file in /root/dir1/dir2/file with root == "root": val p: Path = ??? p.isDir == Some(false)

    2. ,
    3. Given path pointing to a local directory in /root/dir1/dir2/dir/ with root == "root": val p: Path = ??? p.isDir == Some(true)

    4. ,
    5. Given path pointing to object in S3 bucket 's3://bucket/this/is/flat/name/': val p: Path = ??? p.isDire = Some(false)

    6. ,
    7. Given path created from String: val p: Path = ??? p.isDir == None

  3. abstract def lastModified: Option[Instant]

    Returns most recent time when file pointed by this path has been modified if known.

  4. abstract def pathFromRoot: Chain[String]

    Returns names of directories along the path to the item, starting at the root.

    Returns names of directories along the path to the item, starting at the root.

    Examples:
    1. Given path pointing to a local file in /root/dir1/dir2/file with root == "root": val p: Path = ??? p.pathFromRoot == List("dir1", "dir2")

    2. ,
    3. Given path pointing to a local directory in /root/dir1/dir2/dir/ with root == "root": val p: Path = ??? p.pathFromRoot == List("dir1", "dir2", "dir")

  5. abstract def root: Option[String]

    Returns optional root of this path.

    Returns optional root of this path. It might be bucket name or specific directory to which it is necessary to restrict access to.

    Example:
    1. Given path pointing inside S3 bucket 'bucket': val p: Path = ??? p.root == Some("bucket")

  6. abstract def size: Option[Long]

    Returns size in bytes of the file pointed by this path if known.

    Returns size in bytes of the file pointed by this path if known. For directories always return None.

    Example:
    1. Given path pointing to a local 20 byte file: val p: Path = ??? p.size = Some(20)

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(obj: Any): Boolean
    Definition Classes
    Path → AnyRef → Any
    Annotations
    @SuppressWarnings()
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    Path → AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. def withFileName(newFileName: Option[String], reset: Boolean = true): Path

    Returns path with fileName field set to provided value.

    Returns path with fileName field set to provided value.

    newFileName

    - value to be set as fileName.

    reset

    - when true fields isDir, size and lastModified in returned object would be set to None, otherwise kept the same.

    returns

    new Path with fileName field set to provided param.

  21. def withIsDir(newIsDir: Option[Boolean], reset: Boolean = true): Path

    Returns path with isDir field set to provided value.

    Returns path with isDir field set to provided value.

    newIsDir

    - value to be set as isDir.

    reset

    - when true fields size and lastModified in returned object would be set to None, otherwise kept the same.

    returns

    new Path with isDir field set to provided param.

  22. def withLastModified(newLastModified: Option[Instant], reset: Boolean = true): Path

    Returns path with lastModified field set to provided value.

    Returns path with lastModified field set to provided value.

    newLastModified

    - value to be set as lastModified.

    reset

    - when true fields size and isDir in returned object would be set to None, otherwise kept the same.

    returns

    new Path with lastModified field set to provided param.

  23. def withPathFromRoot(newPathFromRoot: Chain[String], reset: Boolean = true): Path

    Returns path with pathFromRoot field set to provided value.

    Returns path with pathFromRoot field set to provided value.

    newPathFromRoot

    - value to be set as pathFromRoot.

    reset

    - when true fields isDir, size and lastModified in returned object would be set to None, otherwise kept the same.

    returns

    new Path with pathFromRoot field set to provided param.

  24. def withRoot(newRoot: Option[String], reset: Boolean = true): Path

    Returns path with root field set to provided value.

    Returns path with root field set to provided value.

    newRoot

    - value to be set as root.

    reset

    - when true fields isDir, size and lastModified in returned object would be set to None, otherwise kept the same.

    returns

    new Path with root field set to provided param.

  25. def withSize(newSize: Option[Long], reset: Boolean = true): Path

    Returns path with size field set to provided value.

    Returns path with size field set to provided value.

    newSize

    - value to be set as size.

    reset

    - when true fields isDir and lastModified in returned object would be set to None, otherwise kept the same.

    returns

    new Path with size field set to provided param.

Inherited from AnyRef

Inherited from Any

Ungrouped