Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference

ID 767251
Date 3/22/2024
Public
Document Table of Contents

SETFILEACCESSQQ

Portability Function: Sets the file access mode for a specified file.

Module

USE IFPORT

result = SETFILEACCESSQQ (filename,access)

filename

(Input) Character*(*). Name of a file to set access for.

access

(Input) INTEGER(4). Constant that sets the access. Can be any combination of the following flags, combined by an inclusive OR (such asIOR or OR):

  • FILE$ARCHIVE - Marked as having been copied to a backup device.

  • FILE$HIDDEN - Hidden. The file does not appear in the directory list that you can request from the command console.

  • FILE$NORMAL - No special attributes (default).

  • FILE$READONLY - Write-protected. You can read the file, but you cannot make changes to it.

  • FILE$SYSTEM - Used by the operating system.

The flags are defined in module IFPORT.F90.

Results

The result type is LOGICAL(4). The result is .TRUE. if successful; otherwise, .FALSE..

To set the access value for a file, add the constants representing the appropriate access.

Example

 USE IFPORT
 INTEGER(4) permit
 LOGICAL(4) result

 permit = 0   ! clear permit
 permit = IOR(FILE$READONLY, FILE$HIDDEN)
 result = SETFILEACCESSQQ ('formula.f90', permit)
 END

See Also