File System - Resolve

> File (System, Transfer, Storage)

1 - About

The resolve function is a algorithm on a file system return a path.

It is equivalent to the execution of change directory (cd) on every argument but it apply also to file.

3 - Example

resolve('/c','/m','b') = '/m/b'
  • the first argument is executed, the current path is the absolute path /c because it begins with a root character /
  • the second argument is executed, the current path is the absolute path /m because it begins with a root character /
  • the third argument is executed, the current path is the path /m/b because b is a relative path (ie it does not begin with a root character /)
Advertising