/** * Get type * * @return string */ public function getType() { if ($this->storage->isDir($this->key)) { return self::TYPE_DIR; } return pathinfo($this->key, PATHINFO_EXTENSION); }
public function testIsDir() { $this->storage->storeItem('dir/file', 'data'); $this->assertFalse($this->storage->isDir('dir/file')); $this->assertTrue($this->storage->isDir('dir')); }