src/Helpers/FileHelper.php
public static function permissionsAsOctal($modeStr) {
        $modeStr = str_pad($modeStr, 9, '-', STR_PAD_RIGHT);
        $modeOctal = 0x0;
        $num = 0;
        foreach (static::$_permissionsByteMap as $bytes => $flag) {
            $modeOctal += (($modeStr[$num] === $flag) ? $bytes : 0x0);
            $num++;
        }
        return $modeOctal;
    }
public static function permissionsAsOctal($modeStr) {
        $modeStr = str_pad($modeStr, 9, '-', STR_PAD_RIGHT);
        $modeOctal = 0x0;
        $num = 0;
        foreach (static::$_permissionsByteMap as $bytes => $flag) {
            $modeOctal += (($modeStr[$num] === $flag) ? $bytes : 0x0);
            $num++;
        }
        return $modeOctal;
    }
Convert string representation of permissions to octal
@param string $modeStr String permissions (rwxr-xr-x)
@return int Octal permissions representation