string.GetPathFromFilename

From Garry's Mod
Jump to: navigation, search
 string.GetPathFromFilename( )

Contents

Description

Returns the path only from a file's path.

Arguments

string Inputstring

String to get path from.

Returns

string

Path

Examples

Example

Demonstrates the use of string.GetPathFromFilename

MsgN(string.GetPathFromFilename("garrysmod/lua/modules/string.lua"))

Output:

"garrysmod/lua/modules/"
Personal tools
Navigation