file = WBClass::create('WBVFS_File'); } public function import($file) { $name = basename($file); $vfs = $this->file->import($file, basename($file), true); $url = $vfs->getUrl(); $url = WBString::replaceSuperplaceHolders($url); printf('%s id: %s obscureid: %s
' . "\n", $url, $vfs->getName(), $vfs->getId(), $vfs->getObscureid()); } public function importDir($dir) { echo "

Import $dir

\n"; $di = new DirectoryIterator($dir); foreach ($di as $f) { if ($f->isDot() || $f->isDir()) { continue; } $this->import($f->getPathname()); } } } $ti = new TestImportFiles(); $ti->importDir($dir); // $ti->import($file); ?>