normalize

get normalized version of given path


Parameters

normalize path :string :literal :pathliteral

Attributes

executabletreat path as executable
tildeexpand tildes in path

Returns

  • :string
  • or  :nothing

Examples

copy
normalize "one/../two/../../three" ; => ../three normalize "~/one/../two/../../three" ; => three

copy
normalize.tilde "~/one/../two/../../three" ; => /Users/three normalize.tilde "~/Documents" ; => /Users/drkameleon/Documents

copy
normalize.executable "myscript" ; => ./myscript

Related