Beispiel #1
0
 /**
  * Return the simple boolean attributes for the file or directory denoted
  * by the given pathname, or zero if it does not exist or some
  * other I/O error occurs.
  *
  * @param File $f
  * @return int
  */
 public function getBooleanAttributes(File $f)
 {
     if (!$f->exists()) {
         return 0;
     }
     $mode = substr(sprintf('%o', $f->getPerms()), -4);
     $mode = intval($mode, 8);
     return $mode;
 }