★ wanayoo — archive 1999 http://www.php.net/manual/ja/function.stat.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to ファイルシステム
Quick Reference
English version of this pageGerman version of this pageItalian version of this pageFrench version of this pageHungarian version of this page
ファイルシステム
* basename
* chgrp
* chmod
* chown
* clearstatcache
* copy
* delete
* dirname
* diskfreespace
* fclose
* feof
* fgetc
* fgetcsv
* fgets
* fgetss
* file
* file_exists
* fileatime
* filectime
* filegroup
* fileinode
* filemtime
* fileowner
* fileperms
* filesize
* filetype
* flock
* fopen
* fpassthru
* fputs
* fread
* fscanf
* fseek
* fstat
* ftell
* ftruncate
* fwrite
* set_file_buffer
* is_dir
* is_executable
* is_file
* is_link
* is_readable
* is_writeable
* link
* linkinfo
* mkdir
* pclose
* popen
* readfile
* readlink
* rename
* rewind
* rmdir
* stat
* lstat
* realpath
* symlink
* tempnam
* touch
* umask
* unlink
Manual: stat
View the source code for this pageSearch the site



Previous page
 rmdir
 Updated
Sat, 12 Aug 2000
lstat 
Next page


stat

(PHP3 , PHP4 )

stat -- ファイルに関する情報を取得する

説明

array stat (string filename)

filenameで指定されたファイルに ついての統計情報を取得します。

ファイルの統計情報を、以下の要素を持つ配列として 返します。

  1. device

  2. inode

  3. inode protection mode

  4. number of links

  5. user id of owner

  6. gourp id owner

  7. device type if inode device *

  8. size in bytes

  9. time of last access

  10. time of last modification

  11. time of last change

  12. blocksize for filesystem I/O *

  13. number of blocks allocated

* - st_blksizeタイプをサポートしているシステムでのみ有効です。 その他のシステム(たとえばWindowsなど)では-1を返します。

この関数の結果はキャッシュされます。詳細は、 clearstatcache()を参照下さい。


User Contributed Notes: stat


ian@eiloart.com
23-Jul-1999 08:52
Here's what the UNIX man page on stat has to say about the difference between a file change and a file modification:

st_mtime Time when data was last modified. Changed by the following functions: creat(), mknod(), pipe(), utime(), and write(2).

st_ctime Time when file status was last changed. Changed by the following functions: chmod(), chown(), creat(), link(2), mknod(), pipe(), unlink(2), utime(), and write().

So a modification is a change in the data, whereas a change also happens if you modify file permissions and so on.



esmith@schicktech.com
07-Mar-2000 11:53
Note that in the docs above, the array is zero based. I scratched my head a couple of times, before decreasing each item by one. ie - stat for file size is actually 7 !


dvogel@intercarve.net
18-May-2000 04:20
Is the information cached (ie: cleared by clearstatcache()) cached on a per script basis, or do scripts share a global cache?


 About Notes


Previous page
 rmdir
 Updated
Sat, 12 Aug 2000
lstat 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.