GC_Filesystem_SSH2::sftp_path()

最后更新于:2021-11-27 20:52:19

GC_Filesystem_SSH2::sftp_path( string$path)

Gets the ssh2.sftp PHP stream wrapper path to open for the given file.

参数

$path

(string) (Required) The File/Directory path on the remote server to return

响应

(string) The ssh2.sftp:// wrapped path to use.

源文件

文件: gc-admin/includes/class-gc-filesystem-ssh2.php

	public function sftp_path( $path ) {
		if ( '/' === $path ) {
			$path = '/./';
		}

		return 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $path, '/' );
	}