Crate deno_path_util

Source

Modules§

fs

Structs§

PathToUrlError
UrlToFilePathError

Enums§

ResolveUrlOrPathError

Functions§

get_atomic_path
normalize_path
Normalize all intermediate components of the path (ie. remove “./” and “../” components). Similar to fs::canonicalize() but doesn’t resolve symlinks.
resolve_path
Converts a string representing a relative or absolute path into a ModuleSpecifier. A relative path is considered relative to the passed current_dir.
resolve_url_or_path
Takes a string representing either an absolute URL or a file path, as it may be passed to deno as a command line argument. The string is interpreted as a URL if it starts with a valid URI scheme, e.g. ‘http:’ or ‘file:’ or ‘git+ssh:’. If not, it’s interpreted as a file path; if it is a relative path it’s resolved relative to passed current_dir.
specifier_has_uri_scheme
Returns true if the input string starts with a sequence of characters that could be a valid URI scheme, like ‘https:’, ‘git+ssh:’ or ‘data:’.
strip_unc_prefix
url_from_directory_path
url_from_file_path
url_parent
Gets the parent of this url.
url_to_file_path
Attempts to convert a url to a file path. By default, uses the Url crate’s to_file_path() method, but falls back to try and resolve unix-style paths on Windows.