Implemented (partially) flags for file/directory opening.