> For the complete documentation index, see [llms.txt](https://enls.gitbook.io/rgss-reference-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://enls.gitbook.io/rgss-reference-manual/standard-library/built-in-modules/filetest.md).

# FileTest

A module containing file test functions.

### Module Functions

FileTest.exist?(filename)

Returns TRUE when filename exists.

FileTest.directory?(filename)

Returns TRUE when filename is a directory.

FileTest.file?(filename)

Returns TRUE when filename is an ordinary file.

FileTest.size(filename)

Returns the size of filename. If filename does not exist, throws an Errno::EXXX exception (most likely Errno::ENOENT).
