WP_Filesystem_SSH2::getchmod
Gets the permissions of the specified file or filepath in their octal format.
Метод класса: WP_Filesystem_SSH2{}
Хуков нет.
Возвращает
string. Mode of the file (the last 3 digits). Empty string on failure.
Использование
$WP_Filesystem_SSH2 = new WP_Filesystem_SSH2(); $WP_Filesystem_SSH2->getchmod( $file );
- $file(строка) (обязательный)
- Path to the file.
Список изменений
| С версии 2.7.0 | Введена. |
Код WP_Filesystem_SSH2::getchmod() WP Filesystem SSH2::getchmod WP 7.1.4
public function getchmod( $file ) {
$file_perms = @fileperms( $this->sftp_path( $file ) );
if ( ! is_int( $file_perms ) ) {
return '';
}
return substr( decoct( $file_perms ), -3 );
}