Garry's Mod Wiki

Revision Difference

file.IsDir#518408

<function name="IsDir" parent="file" type="libraryfunc"> <description>Returns whether the given file is a directory or not.</description> <realm>Shared and Menu</realm> <args> <arg name="fileName" type="string">The file or directory&#x27;s name.</arg> <arg name="fileName" type="string">The file or directory's name.</arg> <arg name="path" type="string">The path type.</arg> </args> <rets> <ret name="" type="boolean">True if the given path is a directory or false if it is a file.</ret> </rets> </function> <example> <description>Prints if `helloworld.txt` is a directory.</description> <code>print( file.IsDir("helloworld.txt", "DATA") )</code> <output>false</output> </example>