Skip to content

Rose::FileSystem::makeNormal

Normalize a path name.

Synopsis

Declared in <src/Rose/FileSystem.h>

[[visibility]]
Path
makeNormal(Path const&);

Description

Normalizes a path by removing "." and ".." components to the extent which is possible.

For instance, a name like "/foo/bar/../baz" will become "/foo/baz" and the name "/foo/./baz" will become "/foo/baz". However, the names "/../foo" and "./foo" cannot be changed because removing the ".." in the first case would place it in a different directory if the name were appended to another name, and in the second case it would convert a relative name to an absolute name.

Return Value

Name of entities in a filesystem.

Created with MrDocs