Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, it is not possible to verify whether a fstream is a file or a directory because the fstream is just a stream of bytes to read or write data to a file or directory. The underlying operating system determines whether the fstream refers to a file or a directory when it is opened, but the fstream itself does not contain information about its type. To determine the type of a file or directory, you can use operating system-specific functions or libraries.