array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ja', ), 'this' => array ( 0 => 'function.ssh2-sftp-lstat.php', 1 => 'ssh2_sftp_lstat', ), 'up' => array ( 0 => 'ref.ssh2.php', 1 => 'SSH2 関数', ), 'prev' => array ( 0 => 'function.ssh2-sftp-chmod.php', 1 => 'ssh2_sftp_chmod', ), 'next' => array ( 0 => 'function.ssh2-sftp-mkdir.php', 1 => 'ssh2_sftp_mkdir', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ja', 'path' => 'reference/ssh2/functions/ssh2-sftp-lstat.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ssh2 >= 0.9.0)
ssh2_sftp_lstat — シンボリックリンクの情報を取得する
リンクを辿らないで リモートファイルシステムのシンボリックリンクの情報を取得します。
この関数は ssh2.sftp:// ラッパーを使用した場合の lstat() 関数と同様です。 戻り値も同じです。
戻り値の詳細については stat() のドキュメントを参照ください。
例1 SFTP 経由でのシンボリックリンクの情報の取得
<?php
$connection = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($connection, 'username', 'password');
$sftp = ssh2_sftp($connection);
$statinfo = ssh2_sftp_lstat($sftp, '/path/to/symlink');
$filesize = $statinfo['size'];
$group = $statinfo['gid'];
$owner = $statinfo['uid'];
$atime = $statinfo['atime'];
$mtime = $statinfo['mtime'];
$mode = $statinfo['mode'];
?>