PHP Function Stat
php function stat is a C-level API call to the filesystem that returns metadata about the file, such as user, group, readability, writability, size and modification time. A number of functions in PHP need this information, including the stat function itself and is_readable, is_writable and others. Since these functions often perform a lot of computationally intensive calls to stat() and the related lstat(), this can become a performance issue. The php function stat caches the results of these low-level stat operations to avoid this.
The stat() function takes one parameter, the filename of the file for which you want to get statistics. The return value is an array with the number index, the name index or both. The stat() function is also available as a lstat() function, which takes the same parameters as stat() but returns the lstat() values instead of the standard ones. The lstat() function is more efficient than stat() but it still requires the files to be open.
If you need to force a probabilistic evaluation, you can use the function pstat() which calculates an array of values in probability mode over the Run index. The system variable sampleSize is used to specify the size of this array. This function is useful for displaying the common statistical values of an uncertain variable, such as Mean or Standard Deviation, in the uncertainty views in the Result window. You can also see these statistics by selecting the Statistics option in the Uncertainty Setup dialog. The optional argument 'filter' determines which cases are to be included in the calculation of the statistic (see below).