file.IsDir

From Garry's Mod
Jump to: navigation, search
 file.IsDir( )

Contents

Description

Returns whether the given file is a directory or not.

Arguments

string fileName

The file or directory's name.

Arguments

string path

The path type.

Returns

boolean

True if the given path is a directory or false if it is a file.

Examples

Example

Prints if helloworld.txt is a directory.

print( file.IsDir("helloworld.txt", "DATA") )

Output:

false
Personal tools
Navigation