Go to the first, previous, next, last section, table of contents.


LStat Intrinsic (function)

LStat(File, SArray)

LStat: INTEGER(KIND=1) function.

File: CHARACTER; scalar; INTENT(IN).

SArray: INTEGER(KIND=1); DIMENSION(13); INTENT(OUT).

Intrinsic groups: unix.

Description:

Obtains data about the given file File and places them in the array SArray. A null character (`CHAR(0)') marks the end of the name in File---otherwise, trailing blanks in File are ignored. If File is a symbolic link it returns data on the link itself, so the routine is available only on systems that support symbolic links. The values in this array are extracted from the stat structure as returned by fstat(2) q.v., as follows:

  1. File mode
  2. Inode number
  3. ID of device containing directory entry for file
  4. Device id (if relevant)
  5. Number of links
  6. Owner's uid
  7. Owner's gid
  8. File size (bytes)
  9. Last access time
  10. Last modification time
  11. Last file status change time
  12. Preferred I/O block size
  13. Number of blocks allocated

Not all these elements are relevant on all systems. If an element is not relevant, it is returned as 0.

Returns 0 on success or a non-zero error code (ENOSYS if the system does not provide lstat(2)).

For information on other intrinsics with the same name: See section LStat Intrinsic (subroutine).


Go to the first, previous, next, last section, table of contents.