Skip to main content

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

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

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.


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

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.