public static function scan($path, $options = [])
    {
        $defaults = [
            'iterator'       => RecursiveIteratorIterator::SELF_FIRST,
            'skipDots'       => true,
            'leavesOnly'     => false,
            'followSymlinks' => true,
            'recursive'      => true
        ];
        $options += $defaults;

        $paths = (array) $path;

        $dirFlags = static::_dirFlags($options);
        $iteratorFlags = static::_iteratorFlags($options);

        $result = [];
        foreach ($paths as $path) {
            $result = array_merge($result, static::_scan($path, $options, $dirFlags, $iteratorFlags));
        }
        return $result;
    }