original_string: public static function getPermissions($path)
      {
          try
          {
              $mode = @fileperms($path);
              if ($mode === false)
                  throw new IOException();
          }
          catch (Throwable $e)
          {
              throw new IOException("Could not stat: " . $path);
          }
  
          $perms = array(
              'owner' => array(
                  'read'    => (bool)($mode & 0x0100),
                  'write'   => (bool)($mode & 0x0080),
                  'execute' => (bool)($mode & 0x0040)
              ),
              'group' => array(
                  'read'    => (bool)($mode & 0x0020),
                  'write'   => (bool)($mode & 0x0010),
                  'execute' => (bool)($mode & 0x0008)
              ),
              'world' => array(
                  'read'    => (bool)($mode & 0x0004),
                  'write'   => (bool)($mode & 0x0002),
                  'execute' => (bool)($mode & 0x0001)
              )
          );
  
          $perms['mode'] = self::compileMode($perms);
          return $perms;
      }
code: public static function getPermissions($path)
      {
          try
          {
              $mode = @fileperms($path);
              if ($mode === false)
                  throw new IOException();
          }
          catch (Throwable $e)
          {
              throw new IOException("Could not stat: " . $path);
          }
  
          $perms = array(
              'owner' => array(
                  'read'    => (bool)($mode & 0x0100),
                  'write'   => (bool)($mode & 0x0080),
                  'execute' => (bool)($mode & 0x0040)
              ),
              'group' => array(
                  'read'    => (bool)($mode & 0x0020),
                  'write'   => (bool)($mode & 0x0010),
                  'execute' => (bool)($mode & 0x0008)
              ),
              'world' => array(
                  'read'    => (bool)($mode & 0x0004),
                  'write'   => (bool)($mode & 0x0002),
                  'execute' => (bool)($mode & 0x0001)
              )
          );
  
          $perms['mode'] = self::compileMode($perms);
          return $perms;
      }
code_tokens: public static function getPermissions ( $ path ) { try { $ mode = @ fileperms ( $ path ) ; if ( $ mode === false ) throw new IOException ( ) ; } catch ( Throwable $ e ) { throw new IOException ( "Could not stat: " . $ path ) ; } $ perms = array ( 'owner' => array ( 'read' => ( bool ) ( $ mode & 0x0100 ) , 'write' => ( bool ) ( $ mode & 0x0080 ) , 'execute' => ( bool ) ( $ mode & 0x0040 ) ) , 'group' => array ( 'read' => ( bool ) ( $ mode & 0x0020 ) , 'write' => ( bool ) ( $ mode & 0x0010 ) , 'execute' => ( bool ) ( $ mode & 0x0008 ) ) , 'world' => array ( 'read' => ( bool ) ( $ mode & 0x0004 ) , 'write' => ( bool ) ( $ mode & 0x0002 ) , 'execute' => ( bool ) ( $ mode & 0x0001 ) ) ) ; $ perms [ 'mode' ] = self :: compileMode ( $ perms ) ; return $ perms ; }
docstring: Return the permissions set on the specified file.
  @param string $path The path to examine
  @return array An associative array containing 'owner', 'group' and 'world',
  members, each containing 'read', 'write' and 'execute'
  indicating their permissions.
docstring_tokens: Return the permissions set on the specified file .