FileNamingResolver\FileInfo::isExists PHP Méthode

isExists() public méthode

Checks whether a file / directory exists.
public isExists ( ) : boolean
Résultat boolean
    public function isExists()
    {
        return file_exists($this->toString());
    }

Usage Example

 public function testIsExists()
 {
     $existentFileInfo = new FileInfo(__FILE__);
     $nonExistentFileInfo = new FileInfo(ltrim(__FILE__, '/'));
     $this->assertTrue($existentFileInfo->isExists());
     $this->assertFalse($nonExistentFileInfo->isExists());
 }