method hasFile documentation in bbn\File\Dir

Checks if the given file(s) exists in the directory.

Accepts unlimited arguments (files name).

Example

\bbn\X::dump(\bbn\File\Dir::hasFile("/home/data/test/file.txt")); // (bool) true \bbn\X::dump(\bbn\File\Dir::hasFile("/home/data/test", "file.txt", "doc.pdf")); // (bool) true function(string $dir) { $dir = self::clean($dir); $as = \func_get_args(); array_shift($as); foreach ( $as as $a ){ if ( !file_exists($dir.'/'.$a) ){ return false; } } return true; }

Checks if the given file(s) exists in the directory. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.