Directory, File, Path

Parent Previous Next

Directory, File, Path.

This group of library functions supports operations to create, delete, rename and copy directories and files. It also supports getting path information about the host and the DLL.


A lot of the functions expect a path as input and in these situations the following rules apply:

When possible it is advisable to provide a full path.


If a function returns a path to a directory, then the path does not have a trailing path delimiter unless we have reached the root:



 String dir := "c:\test1\test2";

 dir := @DirParent(dir); //Now dir == "c:\test1";

 dir := @DirParent(dir); //Now dir == "c:\";



Finding Host and DLL.

The library functions @PathCaller and @PathSelf can return the path information of the host executable and the DLL.


Please notice that both functions use the Windows API function GetModuleFileName, which according to the MSDN documentation requires the DLL to be loaded in a simple ordinary manner - avoiding certain specialized load library methodologies, or else GetModuleFileName will not be able to return a path. If you experience problems please take a closer look at the MSDN description of the GetModuleFileName function and try to avoid advanced load library flags when loading the DLL.