public function storeContents($directory, array $contents, $recursive = false)
    {
        $directories = [$directory];

        foreach ($contents as $object) {
            $this->updateObject($object['path'], $object);
            $object = $this->cache[$object['path']];

            if ($recursive && $this->pathIsInDirectory($directory, $object['path'])) {
                $directories[] = $object['dirname'];
            }
        }

        foreach (array_unique($directories) as $directory) {
            $this->setComplete($directory, $recursive);
        }

        $this->autosave();
    }
public function storeContents($directory, array $contents, $recursive = false)
    {
        $directories = [$directory];

        foreach ($contents as $object) {
            $this->updateObject($object['path'], $object);
            $object = $this->cache[$object['path']];

            if ($recursive && $this->pathIsInDirectory($directory, $object['path'])) {
                $directories[] = $object['dirname'];
            }
        }

        foreach (array_unique($directories) as $directory) {
            $this->setComplete($directory, $recursive);
        }

        $this->autosave();
    }
public function storeContents ( $ directory , array $ contents , $ recursive = false ) { $ directories = [ $ directory ] ; foreach ( $ contents as $ object ) { $ this -> updateObject ( $ object [ 'path' ] , $ object ) ; $ object = $ this -> cache [ $ object [ 'path' ] ] ; if ( $ recursive && $ this -> pathIsInDirectory ( $ directory , $ object [ 'path' ] ) ) { $ directories [ ] = $ object [ 'dirname' ] ; } } foreach ( array_unique ( $ directories ) as $ directory ) { $ this -> setComplete ( $ directory , $ recursive ) ; } $ this -> autosave ( ) ; }
Store the contents listing.

@param string $directory
@param array  $contents
@param bool   $recursive

@return array contents listing
Store the contents listing .