API:DirectoryStream

From Spherical
Revision as of 04:31, 12 August 2017 by Bruce Pascoe (talk | contribs) (Add See Also section)
Jump to: navigation, search


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

Usage
dirstream_obj = new DirectoryStream(dir_name);

API Information

Description

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: DirectoryStream objects are compatible with the JavaScript iterator protocol, so you can use them in a from() query.

Parameters

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

Properties

Methods

See Also