System ScanDirectory

From CryWiki

Jump to: navigation, search

System.ScanDirectory(string, number[, number])

Description

Scans a directory for files/subdirectories.

Arguments

  1. The path to the directory (Relative to the game/ directory)
  2. Scan mode:

0: all

1: only files

2: only subdirectories

  1. (OPTIONAL) Search in .paks also?

Returns

Table with the data.

Example

Lua (example)
local files = System.ScanDirectory("scripts", 1, 1);
Log("There are %d files in the scripts directory", files);


Personal tools