Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Inquiring about file attributes

Michael8
Beginner
412 Views

Hello:

I'm wondering if anyone knows of a way (in Fortran, of course) to find out if a filehas theread-only attribute turned on. I tried using theINQUIRE statement with the READWRITE specifier, but that seems to only work if I've already opened the file. I'm trying to find out about the file without opening it.

In the meantime, I've found a way to do this using a system call and tapping into the ATTRIB command in DOS, but this is ugly and I'm looking for a, preferably,standard-compliant method.

Thanks.
Michael

0 Kudos
2 Replies
Steven_L_Intel1
Employee
412 Views
In standard Fortran, no. In Intel Fortran, GETFILEINFOQQ.
0 Kudos
Michael8
Beginner
412 Views

Ah, good. That'll do.

Thanks.
Michael

0 Kudos
Reply