Current Location: Home> Function Categories> lstat

lstat

Give information about a file or symbol connection
Name:lstat
Category:File system
Programming Language:php
One-line Description:Returns information about file or symbolic connection.

Definition and usage

lstat() function returns information about a file or symbolic connection.

实例

<?php
print_r(lstat("test.txt"));
?>

输出类似:

Array
(
[0] => 0
[1] => 0
[2] => 33206
[3] => 1
[4] => 0
[5] => 0
[6] => 0
[7] => 92
[8] => 1141633430
[9] => 1141298003
[10] => 1138609592
[11] => -1
[12] => -1
[dev] => 0
[ino] => 0
[mode] => 33206
[nlink] => 1
[uid] => 0
[gid] => 0
[rdev] => 0
[size] => 92
[atime] => 1141633430
[mtime] => 1141298003
[ctime] => 1138609592
[blksize] => -1
[blocks] => -1
)

grammar

 lstat ( file )
parameter describe
file Required. Specify documents to be inspected.

illustrate

Gets statistics about files or symbolic connections specified by file parameters.

return format of lstat()

Digital subscript Associated Key Name (from PHP 4.0.6) illustrate
0 dev Device name
1 ino Number
2 mode inode protection mode
3 nlink Number of connected
4 uid Owner's user id
5 gid Owner's group id
6 rdev Device type, if it is an inode device
7 size Number of bytes of file size
8 atime Last access time (Unix timestamp)
9 mtime Last modified time (Unix timestamp)
10 ctime Last time changed (Unix timestamp)
11 blksize Block size of file system IO
12 Blocks The number of blocks occupied
Similar Functions
  • Get file size filesize

    filesize

    Getfilesize
  • Get the inode of the file fileinode

    fileinode

    Gettheinodeofthefile
  • Write to files (safely used in binary files) fwrite

    fwrite

    Writetofiles(safelyu
  • Returns the file name part in the path basename

    basename

    Returnsthefilenamepa
  • Modify the owner of the symbolic link lchown

    lchown

    Modifytheownerofthes
  • Returns the normalized absolute path name realpath

    realpath

    Returnsthenormalized
  • Determine whether the given file name is a symbolic connection is_link

    is_link

    Determinewhethertheg
  • Format input from a file fscanf

    fscanf

    Formatinputfromafile
Popular Articles