![]() |
boost::filesystem::fopen — Opens a file using C standard library file descriptor.
// In header: <boost/filesystem/cstdio.hpp> std::FILE * fopen(filesystem::path const & p, const char * mode);
This function is equivalent to std::fopen from <cstdio> with the only difference being that the path argument is expressed as const path&. The function attempts to open the file without path character encoding conversion, permitting non-ASCII characters in filesystem paths. If the function does perform character code conversion, it does so by calling path methods, using the locale facet returned by path::codecvt.
Error Reporting:
C standard library and system errors are reported using the return value of a null pointer and errno mechanism. An exception may be thrown by one of the path methods, if called by the implementation.
![]() |
Note |
|---|---|
In particular, |
Parameters: |
|
||||
Returns: |
If the file has been opened successfully, a pointer to the file descriptor, to be closed with |