string.GetFileFromFilename

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

Contents

Description

Returns file name and extension.

Arguments

string pathString

The string eg. file-path to get the file-name from.

Returns

string

The file name

Examples

Example

Returns the file name.

print( string.GetFileFromFilename( "garrysmod/lua/modules/string.lua" ) )

Output:

string.lua
Personal tools
Navigation