filesystem-proposal
filesystem-proposal copied to clipboard
error_code per operation complex the interface too much
That does not feel good. But a 'traditional' global error code makes thread-safe coding hard.
My suggestions are:
- Add an error_code member to directory_entry, *directory_iterator, and provide a member function like is_valid() for user to check the status;
- Move the non-member operational functions into a context class, so that the error code can be managed in the same way.