NAME access - return access mode (r,w,x) or existence of a file SYNOPSIS integer*4 function access (name, mode) character*(*) name, mode USAGE Example: ierr = access ( 'MyFile', 'r' ) DESCRIPTION The access function checks the given file, name, for acces- sability with respect to the caller according to mode. The mode argument can include, in any order, and in any combina- tion, one or more of the following: r Test for read permission w Test for write permission x Test for execute permission (blank) Test for existence An error code is returned if either the argument is illegal, or if the file cannot be accessed in all of the specified modes. 0 is returned if the specified access would be suc- cessful. EXAMPLE To test for read and write permission: integer*4 access, st st = access('anyfile.data', 'rw') if( st .ne.0 ) print*, 'Cannot read/write file' FILES libF77.a SEE ALSO access(2), gerror(3F), perror(3F)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |