public function getFlatListOfFiles()
	{
		if (!isset($this->flatData))
		{
			$this->flatData = [];

			foreach ($this as $entity)
			{
				if ($entity->isFile())
				{
					$this->flatData[] = $entity;
				}
				else
				{
					// The result of this is already flat, so no need for recursion
					foreach ($entity->listContents(true) as $sub)
					{
						if ($sub->isfile())
						{
							$this->flatData[] = $sub;
						}
					}
				}
			}
		}

		return $this->flatData;
	}
public function getFlatListOfFiles()
	{
		if (!isset($this->flatData))
		{
			$this->flatData = [];

			foreach ($this as $entity)
			{
				if ($entity->isFile())
				{
					$this->flatData[] = $entity;
				}
				else
				{
					// The result of this is already flat, so no need for recursion
					foreach ($entity->listContents(true) as $sub)
					{
						if ($sub->isfile())
						{
							$this->flatData[] = $sub;
						}
					}
				}
			}
		}

		return $this->flatData;
	}
public function getFlatListOfFiles ( ) { if ( ! isset ( $ this -> flatData ) ) { $ this -> flatData = [ ] ; foreach ( $ this as $ entity ) { if ( $ entity -> isFile ( ) ) { $ this -> flatData [ ] = $ entity ; } else { // The result of this is already flat, so no need for recursion foreach ( $ entity -> listContents ( true ) as $ sub ) { if ( $ sub -> isfile ( ) ) { $ this -> flatData [ ] = $ sub ; } } } } } return $ this -> flatData ; }
Builds a flat list of files by diving down recursively

@return  array
Builds a flat list of files by diving down recursively