FileNamingResolver\FileInfo::isExists PHP Method

isExists() public method

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

Usage Example

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