class Dir implements Iterator, Countable (View source)

Methods

void
__construct(string $path)

Return items from a folder

static Dir
root()

Return items from root project folder (probably, will depend on the setting of the INPHINIT_ROOT constant)

static Dir
storage()

Return items from storage folder

static Dir
application()

Return items from application folder

void
rewind()

Resets the directory stream to the beginning of the directory

stdClass|null
current()

Get current file with type, path and filename The entries are returned in the order in which they are stored by the filesystem.

int
key()

Get current position in handle

void
next()

Move forward to next file

bool
valid()

Check if pointer is valid

int
count()

Count files in folder, can br used by count($instance) funciton

__destruct()

No description

Details

void __construct(string $path)

Return items from a folder

Parameters

string $path

Return Value

void

Exceptions

Exception

static Dir root()

Return items from root project folder (probably, will depend on the setting of the INPHINIT_ROOT constant)

Return Value

Dir

static Dir storage()

Return items from storage folder

Return Value

Dir

static Dir application()

Return items from application folder

Return Value

Dir

void rewind()

Resets the directory stream to the beginning of the directory

Return Value

void

stdClass|null current()

Get current file with type, path and filename The entries are returned in the order in which they are stored by the filesystem.

Return Value

stdClass|null

int key()

Get current position in handle

Return Value

int

void next()

Move forward to next file

Return Value

void

bool valid()

Check if pointer is valid

Return Value

bool

int count()

Count files in folder, can br used by count($instance) funciton

Return Value

int

__destruct()

No description