Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
DWrightson Absent Member.
Absent Member.
979 views

Is there a way to tell if a file is opened I/O, Input or Output?

Is there any way I can tell what type of open was used to access a file? ie: was it opened input/output or i-o.

Thanks

0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

RE: Is there a way to tell if a file is opened I/O, Input or Output?

Not that I know of.  You may be able to deduce some (other process) OPEN modes by trying different OPEN modes and seeing which ones fail.  I don't think there's a direct way to determine this however.

0 Likes
Micro Focus Contributor
Micro Focus Contributor

RE: Is there a way to tell if a file is opened I/O, Input or Output?

There isn't a function available that I have seen.  You could write the name, open mode and a unique ID to a file at each open and then remove it when the file is closed and query it using the unique ID to find the open mode used on it if it is needed.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.