name() public method

Example: echo $object->name();
public name ( ) : string
return string
 public function testGetsName()
 {
     $object = new StorageObject($this->connection->reveal(), $name = 'object.txt', 'bucket');
     $this->assertEquals($name, $object->name());
 }
 /**
  * Returns a dictionary of object metadata from an object.
  *
  * @param StorageObject $object
  * @return array
  */
 protected function normaliseObject(StorageObject $object)
 {
     $name = $object->name();
     $info = $object->info();
     $isDir = substr($name, -1) === '/';
     if ($isDir) {
         $name = rtrim($name, '/');
     }
     return ['type' => $isDir ? 'dir' : 'file', 'dirname' => Util::dirname($name), 'path' => $name, 'timestamp' => strtotime($info['updated']), 'mimetype' => $info['contentType'], 'size' => $info['size']];
 }