var allExtensions: [String]?
Unlike AbsolutePath//extension
, this property returns all characters after the first .
character in a filename. If no dot character is present in the filename or first dot is the last character, nil
is returned.
var asURL: Foundation.URL
var basename: String
Last path component (including the suffix, if any). it is never empty.
var basenameWithoutAnyExtension: String
Returns the basename dropping any possible extension.
var basenameWithoutExt: String
Returns the basename without the extension.
var components: [String]
Returns an array of strings that make up the path components of the absolute path. This is the same sequence of strings as the basenames of each successive path component, starting from the root. Therefore the first path component of an absolute path is always /
.
var debugDescription: String
var description: String
var dirname: String
Directory component. An absolute path always has a non-empty directory component (the directory component of the root path is the root itself).
var escapedPathString: String
var `extension`: String?
Extension of the give path’s basename. This follow same rules as suffix except that it doesn’t include leading .
character.
var isRoot: Bool
True if the path is the root directory.
var parentDirectory: AbsolutePath
Absolute path of parent directory. This always returns a path, because every directory has a parent (the parent directory of the root directory is considered to be the root directory itself).
var pathString: String
Normalized string representation (the normalization rules are described in the documentation of the initializer). This string is never empty.
var suffix: String?
Suffix (including leading .
character) if any. Note that a basename that starts with a .
character is not considered a suffix, nor is a trailing .
character.
func appending(String) -> AbsolutePath
Returns the absolute path with additional literal components appended.
func appending(String...) -> AbsolutePath
Returns the absolute path with additional literal components appended.
func appending(RelativePath) -> AbsolutePath
Returns the absolute path with the relative path applied.
func appending(component: String) -> AbsolutePath
Returns the absolute path with an additional literal component appended.
func appending(components: String...) -> AbsolutePath
Returns the absolute path with additional literal components appended.
func appending(components: [String]) -> AbsolutePath
Returns the absolute path with additional literal components appended.
func appending(extension: String) -> AbsolutePath
Returns the absolute path with additional extension appended.
func encode(to: Encoder) throws
func isAncestor(of: AbsolutePath) -> Bool
Returns true if the path is an ancestor of the given path.
func isAncestorOfOrEqual(to: AbsolutePath) -> Bool
Returns true if the path is an ancestor of or equal to the given path.
func isDescendant(of: AbsolutePath) -> Bool
Returns true if the path is a descendant of the given path.
func isDescendantOfOrEqual(to: AbsolutePath) -> Bool
Returns true if the path is a descendant of or equal to the given path.
func prettyPath(cwd: AbsolutePath?) -> String
Returns a path suitable for display to the user (if possible, it is made to be relative to the current working directory).
func relative(to: AbsolutePath) -> RelativePath
Returns a relative path that, when concatenated to base
, yields the callee path itself. If base
is not an ancestor of the callee, the returned path will begin with one or more ..
path components.