From Spherical
Revision as of 03:26, 14 August 2017 by Bruce Pascoe (talk | contribs) (Add DirectoryStream::dispose())
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The new DirectoryStream() constructor initializes an object that allows you to enumerate the contents of a directory.

dirstream_obj = new DirectoryStream(dir_name);

API Information


new DirectoryStream() constructs a Directory Stream object, which allows you to enumerate the contents of a directory. Directory streams only provide filenames; you must use a FileStream to access the contents of a file.

Note: The DirectoryStream class implements the JavaScript iterator protocol, which means you can use them in from() queries and for-of loops.


dir_name Path to the directory to be enumerated. Relative to the game manifest unless a SphereFS prefix is included.

Return Value

A newly constructed DirectoryStream object pointing at dir_name.

Class Information



See Also