Garry's Mod Wiki

Garry's Mod Wiki

  string string.GetPathFromFilename( string path )

Description

Returns the path only from a file's path.

Arguments

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

Returns

1 string
Path or empty string.

Example

Demonstrates the use of string.GetPathFromFilename

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

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...