exists() 공개 메소드

public exists ( ) : boolean
리턴 boolean Whether this file exists.
예제 #1
0
파일: FileTest.php 프로젝트: ibou77/elgg
 public function testCanCheckForItsOwnExistence()
 {
     $directory = GaufretteDirectory::createInMemory();
     $directory->putContents('/foo/bar/bar.php', 'bar');
     $realfile = new File($directory, '/foo/bar/bar.php');
     $nonfile = new File($directory, '/foo/baz.php');
     $this->assertTrue($realfile->exists());
     $this->assertFalse($nonfile->exists());
 }
예제 #2
0
 public function testCanCheckForItsOwnExistence()
 {
     $filesystem = Filesystem::createInMemory();
     $filesystem->put('/foo/bar/bar.php', 'bar');
     $realfile = new File($filesystem, '/foo/bar/bar.php');
     $nonfile = new File($filesystem, '/foo/baz.php');
     $this->assertTrue($realfile->exists());
     $this->assertFalse($nonfile->exists());
 }