public function checkFilePresence($paths, $expectPresence)
    {
        $this->inCurrentDir(function() use ($paths, $expectPresence) {
            foreach((array) $paths as $file) {
                $present = file_exists($file);

                if ($expectPresence && !$present) {
                    throw new ExpectationException("Could not find file:$file");
                }

                if ($present && !$expectPresence) {
                    throw new ExpectationException("Found unexpected file:$file");
                }
            }
        });
    }
public function checkFilePresence($paths, $expectPresence)
    {
        $this->inCurrentDir(function() use ($paths, $expectPresence) {
            foreach((array) $paths as $file) {
                $present = file_exists($file);

                if ($expectPresence && !$present) {
                    throw new ExpectationException("Could not find file:$file");
                }

                if ($present && !$expectPresence) {
                    throw new ExpectationException("Found unexpected file:$file");
                }
            }
        });
    }
public function checkFilePresence ( $ paths , $ expectPresence ) { $ this -> inCurrentDir ( function ( ) use ( $ paths , $ expectPresence ) { foreach ( ( array ) $ paths as $ file ) { $ present = file_exists ( $ file ) ; if ( $ expectPresence && ! $ present ) { throw new ExpectationException ( "Could not find file:$file" ) ; } if ( $ present && ! $ expectPresence ) { throw new ExpectationException ( "Found unexpected file:$file" ) ; } } } ) ; }
Check a file exists

@param string $paths
@param bool $expectPresence
Check a file exists