Oracle Solaris Studio 12.4 Man Pages

印刷ビューの終了

更新: January 2015
 
 

lstat64(3F)

名前

stat64 , lstat64 , fstat64 - ロングファイルのファイルステータスを取得する

形式

integer*4 function stat64(name,statb)
character*(*) name
integer*8 statb(13)
integer*4 function lstat64(name,statb)
character*(*) name
integer*8 statb(13)
integer*4 function fstat64(lunit,statb)
integer*8 statb(13)

説明

これらのルーチンは、ファイルに関する詳細情報を返します。

これらは、対応する statlstat、および fstat ルーチンのバージョンであり、64 ビット整数ステータス配列を使用してロングファイルに関する情報を返します (Solaris 2.6 と 2.7)。

関数 stat64lstat64 は、filename によるクエリーを実行します。

関数 fstat64 は、FORTRAN 論理ユニット lunit によるクエリーを実行します。

各関数の値は、正常終了の場合はゼロ、それ以外の場合はエラーコードです。

変数 statb は、ファイルのステータス構造体を受け取ります。

呼び出しシーケンス:

stat64:
integer*4 stat64
integer*8 statb(13)
character name*(*)
ierr = stat64 ( name, statb )

fstat64:
integer*4 fstat64, logunit
integer*8 statb(13)
ierr = fstat64 ( logunit, statb )

lstat64:
integer*4 lstat64
integer*8 statb(13)
character name*(*)
ierr = lstat64 ( name, statb )

配列 statb に返される情報の意味は、stat(2) の構造体 stat で説明されているとおりです。

予備の値は含まれていません。順序は次のとおりです。

 
statb(1)        device inode resides on
statb(2)        this inode's number
statb(3)        protection
statb(4)        number of hard links to the file
statb(5)        user id of owner
statb(6)        group id of owner
statb(7)        the device type, for inode that is device
statb(8)        total size of file
statb(9)        file last access time
statb(10)       file last modify time
statb(11)       file last status change time
statb(12)       optimal blocksize for file system i/o ops
statb(13)       actual number of blocks allocated

注意

注意

stat64libc ライブラリにある stat(2) を呼び出しますが、lstat64lstat(2) を呼び出します。2 つの libc 関数の違いについては、stat(2) のマニュアルページを参照してください。要するに、名前付きファイルがシンボリックリンクの場合は異なります。lstat64 はリンクに関する情報を返しますが、stat64 はリンクが参照するファイルに関する情報を返します。

ファイル

libfui.a

関連項目

stat(2)、stat(3F) access(3F)、perror(3F)、time(3F)

バグ

パス名の長さは、<sys/param.h> で定義されている MAXPATHLEN の値を超えることはできません。