protected function syncDir($dir) { $this->log('/' . $this->getRelativePath($dir)); $files = sfFinder::type('file')->maxDepth(0)->name('*')->in($dir); foreach ($files as $file) { $this->syncFile($file); } $dirs = sfFinder::type('directory')->maxDepth(0)->name('*')->in($dir); foreach ($dirs as $dir) { $relativePath = $this->getRelativePath($dir); $this->container->create_paths($relativePath . '/dummy'); $this->syncDir($dir); } }
/** * Helper function to create "path" elements for a given Object name * * Given an Object whos name contains '/' path separators, this function * will create the "directory marker" Objects of one byte with the * Content-Type of "application/directory". * * It assumes the last element of the full path is the "real" Object * and does NOT create a remote storage Object for that last element. */ function create_paths($path_name) { $this->initContainer(); return parent::create_paths($path_name); }