<?php
/*<outscirt><version>20180409</version></outscirt>*/

function O__dirToArray($O__directoryPath){
	$O__filesArray = array();
	
	$i = 0;	
	$dir = @opendir($O__directoryPath);
	while (false !== ($file = @readdir($dir))) {
		if ($file != "." && $file != "..") { // disregard "." or ".."
			$O__filesArray[$i][0] = $file;
			
			if(is_dir($O__directoryPath . "/" . $file)){
				$O__filesArray[$i][1] = "d";
			} else {
				$O__filesArray[$i][1] = "f";
			}
			
			$i++;
		}
	}
	return $O__filesArray;		
}
?>
