array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'function.ssh2-sftp-stat.php', 1 => 'ssh2_sftp_stat', ), 'up' => array ( 0 => 'ref.ssh2.php', 1 => 'SSH2 İşlevleri', ), 'prev' => array ( 0 => 'function.ssh2-sftp-rmdir.php', 1 => 'ssh2_sftp_rmdir', ), 'next' => array ( 0 => 'function.ssh2-sftp-symlink.php', 1 => 'ssh2_sftp_symlink', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'reference/ssh2/functions/ssh2-sftp-stat.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PECL ssh2 >= 0.9.0)
ssh2_sftp_stat — Uzak dosya sistemindeki bir dosyanın durum bilgisini döndürür
Bir sembolik bağın hedefindeki dosya sistemi üzerinde bulunan bir dosyanın durum bilgisini alır.
Bu işlev, stat() işlevini ssh2.sftp:// sarmalayıcısı ile kullanmaya eşdeğer olup ikisi de aynı sonucu döndürür.
Dönen değerlerle ilgili ayrıntılı bilgi edinmek için stat() işlevinin açıklamasına bakınız.
Örnek 1 - SFTP üzerinden bir dosyanın durum bilgisini almak
<?php
$baglanti = ssh2_connect('shell.example.com', 22);
ssh2_auth_password($baglanti, 'birey', 'parola');
$sftp = ssh2_sftp($baglanti);
$statinfo = ssh2_sftp_stat($sftp, '/bir/yol/dosya');
$dosyaboyu = $statinfo['size'];
$grup = $statinfo['gid'];
$sahibi = $statinfo['uid'];
$eriszaman = $statinfo['atime'];
$degiszaman = $statinfo['mtime'];
kip = $statinfo['mode'];
?>