In some systems, file function may not be cooperating with threading system.
In example, it's sensible to provide immediate cancelation from system endless waits, caused by a failing network read, so that thread cancelation requests (Thread::stop()) are immediately honored, and proper cleanup actions are taken. Some systems provides support for this behavior, some other don't, some other provides some hooks that should be used by applications to implement this.
OSCOFFEE is a layer that parifies file function cooperativeness with respect to threading library, so that programs can be isomorphic across platforms; no special care must be taken by applications using Wefts's OSCOFFEE to warp around OS deficiencies in helping a good threading model. Wefts++ does it for you.
Other than that, by using OSCOFFEE instead of low level file system operations, you gain immediate portability of the code across all platforms that are supported by wefts. OSCOFFEE use the lowest level available, and it often resolves in just an inlined macro calling those functions; so if you aim to write portable programs, you should rely on OSCOFFEE to access files.
Finally, as functions in OSCOFFEE are limited to file creation, opening, read, write and seek, you may get the raw low level i/o handle and use system specific function where OSCOFFEE is not enough for your needs.
|
The longest integer available on the platform.
|
|
Definition that hooks COFFEE in your application.
|
|
|
Creation modes. This creation modes are meant to be as portable as possible, and to be just an "indication" for the underlying OS operation on how to create a file. Applications that need a greater control over file creation attribute, and that not need to coordinate file creation with Wefts++, may create the file and then pass the descriptor to the OSFileFunc class they wish to use. Refer to the os-specific OSFileFunc documentation to know what kind of OS-Level file descriptor are accepted. Also, refer to os-specific implementation documentation to know how this reuqest are interpreted and passed to the underlying system.
|
|
Basic locking schemes used by various systems at open time.
|
|
Basic open modes used by various systems.
|
|
Position indicators for file seeks.
|