Back to Atomvm

Module filename

main-apidocs-erlang-estdlib-filename.md

latest1.4 KB
Original Source

Module filename

An implementation of a subset of the Erlang/OTP filename interface.

Description

This module implements a strict subset of the Erlang/OTP filename interface.

Function Index

| join/1 | Join a list of path components. | | split/1 | Split a path into its components. |

Function Details

join/1

join(Components::[string()]) -> string()

Components: list of path components to join

returns: the path formed by joining the components with “/”

Join a list of path components.

If a component is absolute (starts with “/”), all preceding components are discarded. Redundant directory separators are removed from the result.

split/1

split(Name::string()) -> [string()]

Name: a path to split into its components

returns: list of path components

Split a path into its components.

If the path is absolute, the first component is “/”. Redundant directory separators are treated as a single separator. Trailing separators are ignored.