Packages

object Path extends Object with Path

Path Singleton

Annotations
@native() @JSImport("path", JSImport.Namespace)
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Path
  2. Path
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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 basename(path: String, ext: String = js.native): String

    Return the last portion of a path, similar to the Unix basename command.

    Return the last portion of a path, similar to the Unix basename command.

    path

    must be a string.

    ext

    optional, if given, must also be a string.

    returns

    the last portion of a path

    Definition Classes
    Path
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. val delimiter: String

    The platform-specific path delimiter, ';' or ':'.

    The platform-specific path delimiter, ';' or ':'.

    Definition Classes
    Path
  8. def dirname(path: String): String

    Return the directory name of a path, similar to the Unix dirname command.

    Return the directory name of a path, similar to the Unix dirname command.

    path

    must be a string.

    returns

    the directory name of a path

    Definition Classes
    Path
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. def extname(path: String): String

    Return the extension of the path, from the last '.' to end of string in the last portion of the path.

    Return the extension of the path, from the last '.' to end of string in the last portion of the path. If there is no '.' in the last portion of the path or the first character of it is '.', then it returns an empty string.

    path

    must be a string.

    returns

    the extension of the path (e.g. ".jpg")

    Definition Classes
    Path
  12. def format(pathObject: PathObject): String

    Returns a path string from an object.

    Returns a path string from an object. This is the opposite of path.parse. If pathObject has dir and base properties, the returned string will be a concatenation of the dir property, the platform-dependent path separator, and the base property. If the dir property is not supplied, the root property will be used as the dir property. However, it will be assumed that the root property already ends with the platform-dependent path separator. In this case, the returned string will be the concatenation of the root property and the base property. If both the dir and the root properties are not supplied, then the returned string will be the contents of the base property. If the base property is not supplied, a concatenation of the name property and the ext property will be used as the base property.

    pathObject

    the given path object

    returns

    a path string from an object

    Definition Classes
    Path
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def isAbsolute(path: String): Boolean

    Determines whether path is an absolute path.

    Determines whether path is an absolute path. An absolute path will always resolve to the same location, regardless of the working directory.

    path

    must be a string.

    returns

    true, if the path is an absolute path

    Definition Classes
    Path
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  19. def join(path1: String, path2: String*): String

    Join all arguments together and normalize the resulting path.

    Join all arguments together and normalize the resulting path.

    path1

    the first portion of the path

    path2

    All arguments must be strings. In v0.8, non-string arguments were silently ignored. In v0.10 and up, an exception is thrown.

    returns

    a composite path

    Definition Classes
    Path
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. def normalize(path: String): String

    Normalize a path, taking care of '..' and '.' parts.

    Normalize a path, taking care of '..' and '.' parts. path must be a string. When multiple slashes are found, they're replaced by a single one; when the path contains a trailing slash, it is preserved. On Windows backslashes are used.

    path

    the path to be normalized

    returns

    the normalized path

    Definition Classes
    Path
  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. def parse(path: String): PathObject

    Returns an object from a path.

    Returns an object from a path.

    path

    must be a string.

    returns

    an object from a path.

    Definition Classes
    Path
  25. val posix: Path

    Provide access to aforementioned path methods but always interact in a posix compatible way.

    Provide access to aforementioned path methods but always interact in a posix compatible way.

    Definition Classes
    Path
  26. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  27. def relative(from: String, to: String): String

    Solve the relative path from from to to.

    Solve the relative path from from to to.

    At times we have two absolute paths, and we need to derive the relative path from one to the other. This is actually the reverse transform of path.resolve, which means we see that:

    path.resolve(from, path.relative(from, to)) == path.resolve(to)
    from

    must be a string.

    to

    must be a string.

    returns

    the relative path

    Definition Classes
    Path
  28. def resolve(args: String*): String

    Resolves to to an absolute path.

    Resolves to to an absolute path. If to isn't already absolute from arguments are prepended in right to left order, until an absolute path is found. If after using all from paths still no absolute path is found, the current working directory is used as well. The resulting path is normalized, and trailing slashes are removed unless the path gets resolved to the root directory. Empty string from arguments are ignored.

    args

    All arguments must be strings.

    returns

    the absolute path

    Definition Classes
    Path
    Example:
    1. path.resolve([from ...], to)
  29. val sep: String

    The platform-specific file separator, '\\' or '/'.

    The platform-specific file separator, '\\' or '/'.

    Definition Classes
    Path
  30. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  31. def toLocaleString(): String
    Definition Classes
    Object
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. def valueOf(): Any
    Definition Classes
    Object
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  37. val win32: Path

    Provide access to aforementioned path methods but always interact in a win32 compatible way.

    Provide access to aforementioned path methods but always interact in a win32 compatible way.

    Definition Classes
    Path

Deprecated Value Members

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

    (Since version ) see corresponding Javadoc for more information.

Inherited from Path

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped