Path parser
Last updated
Last updated
[io/file/Path parser]
Parses a file system path into its components. Example:
"/home/user1/dir1/foo.txt"@0 received on path
{
"directory": "/home/user1/dir1",
"basename": "foo",
"extension": ".txt"
}@0 sent on components
path: string
Receives the path to parse. Example:
"/home/user1/dir1/foo.txt"
"C:/Users/User1/dir1/foo.txt"
(To keep the application portable use "/" as path separator.)
components:
Sends the resulting path components. Example:
{ "directory": "/home/user1/dir1", "basename": "foo", "extension": ".txt" }
{ "directory": "C:/Users/User1/dir1", "basename": "foo", "extension": ".txt" }