예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function remove(File $file) : bool
 {
     $key = $file->getKey();
     if ($this->filesystem->has($key)) {
         return $this->filesystem->delete($key);
     }
     return true;
 }
예제 #2
0
 /**
  * Test that key string is created.
  */
 public function testCreateKey()
 {
     $file = new File();
     $file->setTmpPathname(TestPathProvider::getPath() . '/Fixtures/files/test.txt')->setFileMetadata()->setPath('/test/path')->createKey();
     $this->assertEquals(1, preg_match('/^(\\/\\w+)+\\.[a-zA-Z]+$/', $file->getKey()));
 }