delete() 공개 메소드

Deletes the file from the filesystem.
public delete ( array $metadata = [] ) : boolean
$metadata array optional metadata which should be send when write
리턴 boolean TRUE on success
예제 #1
0
 public function testCreateAnDeleteFile()
 {
     $fs = $this->getFilesystem();
     $filename = uniqid('test_');
     $file = new File($filename, $fs);
     $this->assertFalse($file->exists());
     $file->setContent('Hello');
     $this->assertTrue($file->exists());
     $file->delete();
     $this->assertFalse($file->exists());
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 public function delete()
 {
     $this->file->delete();
 }