/** * @param $name * @dataProvider nameProvider */ public function testDirPaths($name) { $txtFile = $this->getTextFile(); $this->share->mkdir($this->root . '/' . $name); $this->share->put($txtFile, $this->root . '/' . $name . '/' . $name); unlink($txtFile); $content = $this->share->dir($this->root . '/' . $name); $this->assertCount(1, $content); $this->assertEquals($name, $content[0]->getName()); }
/** * Create a directory. * * @param string $path * @param Config $config * @return array|false */ public function createDir($path, Config $config) { $fullPath = $this->applyPathPrefix($path); try { $this->share->mkdir($fullPath); } catch (AlreadyExistsException $e) { // That's okay. } catch (NotFoundException $e) { return false; } return ['path' => $path]; }