WP_Filesystem_SSH2::getchmod() – Gets the permissions of the specified file or filepath in their octal format.

You appear to be a bot. Output may be restricted

Description

Gets the permissions of the specified file or filepath in their octal format.

Usage

$string = WP_Filesystem_SSH2::getchmod( $file );

Parameters

$file
( string ) required – Path to the file.

Returns

string Mode of the file (the last 3 digits).

Source

File name: wordpress/wp-admin/includes/class-wp-filesystem-ssh2.php
Lines:

1 to 3 of 3
  public function getchmod( $file ) {
    return substr( decoct( @fileperms( $this->WP_Filesystem_SSH2::sftp_path( $file ) ) ), -3 );
  }
 

 View on GitHub View on Trac