The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ParentDir


Unit: SDL_filesys
Class: none
Declaration: function ParentDir (path: string): string;

The function ParentDir returns the parent directory of the path specified in the parameter path. The path parameter has to contain the full path of a directory (not a file path). The function returns an empty string if there is no parent directory (i.e. if the path specifies a root directory).

Hint: Please note that ParentDir expects to receive a directory path in the path parameter, not a file path. If a file path is passed in path the function returns the directory of this file, not the parent directory.



Last Update: 2023-Feb-06