Garry's Mod Wiki

Garry's Mod Wiki

  string util.FullPathToRelative_Menu( string fullPath, string fsPath = "MOD" )

Description

Converts the full path of the given file to a relative path.
You can use util.RelativePathToFull_Menu to convert the relative path back to the full path.

Arguments

1 string fullPath
The full path to a file.
2 string fsPath = "MOD"
The path to look for the files and directories in. See this list for a list of valid paths.

Returns

1 string relativePath
The relative path to the given file.

Example

Searches for a .gma file in your addons folder and converts the path to a full path.

print( util.FullPathToRelative_Menu( "[Steam folder]\common\garrysmod\garrysmod\addons\[Name HERE].gma", "GAME" ) ) -- prints the relative path of the GMA file.
Output:
addons\[Name].gma

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...