~~Title: FolderEnum ~~
The **FolderEnum** object is returned from the **[[fsutil|FSUtil]].ReadDir** method. It lets you enumerate (optionally, recursively) the contents of a folder.
$$ Property Name
$$ Return Type
$$ Description
$$ complete
$$ //bool//
$$ **True** if the enumeration is complete, otherwise **False**.
$$ error
$$ //int//
$$ If an error occurs this will return the error code. It will return 0 on success.
$$ Method Name
$$ **Arguments**
$$ Return Type
$$ Description
$$ Close
$$ //none//
$$ //none//
$$ Closes the underlying file system handle used to perform the enumeration. You might call this method if you want to delete the folder you just enumerated. After this method is called the **complete** property will return **True**.
$$ Next
$$ \\
<**[[vector|Vector]]**:vector>
$$ //object://**[[item|Item]]**
or
//object://**[[vector|Vector]]**
$$ Returns the next item in the enumeration.
By default (with no arguments provided) a single **[[item|Item]]** object is returned. For higher performance, you can specify a number as the first argument to return more than one item at once - in this case, a **[[vector|Vector]]** of **[[item|Item]]** objects is returned instead. Specify **-1** to return all items in the folder in one call.
You can also create your own **[[vector|Vector]]** and pass it as the second argument to stop Opus creating a new **[[vector|Vector]]** each time.