HolyLib Wiki

filesystem.RelativePathToFullPath

 string filesystem.RelativePathToFullPath( string filePath, string gamePath )

Description

Returns the full path of the given file/folder relative to the given game path.

Arguments

1string filePath

the file/folder path to use

2string gamePath

game path that the given file/folder is inside

Returns

1string fullPath

Returns the full path or nil on failure

Example

-- The "MOD_WRITE" game path has a single searchpath that is "/home/container/garrysmod/" in this case. -- So we expect it to become "/home/container/garrysmod/garrysmod.ver" print(filesystem.RelativePathToFullPath("garrysmod.ver", "MOD_WRITE"))
/home/container/garrysmod/garrysmod.ver