Garry's Mod Wiki

Garry's Mod Wiki

  boolean file.IsDir( string fileName, string gamePath )

Description

Returns whether the given file is a directory or not.

Arguments

1 string fileName
The file or directory's name.
2 string gamePath
The path to look for the files and directories in. See this list for a list of valid paths.

Returns

1 boolean
true if the given path is a directory or false if it's a file.

Example

Prints if helloworld.txt is a directory.

print( file.IsDir( "helloworld.txt", "DATA" ) )
Output:
false

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