How would you like to access files from a application development point of view? The current ideas:
- POSIX-style: fopen returning a FILE * structure with information about it, using that to fread, fclose, fwrite, fgetc etc.
- Linux-style: returning an FD that can be used with read/write/close etc.
- Windows-style: I don't know but I guess it's similar to Linux
- Mmap-style: Memory mapping a file that may/may not grow, with a maximum size, and using mainly memory mapped files (only?).
- A write_at() function that writes into a file without opening/closing semantics, thread safe
- An append_to() function that appends a given string to a file without open/close, and no thread problems
- Locked for writing, locked for multiple readers or Do-it-yourself file protection for file opening/closing?
- Special modes, protection, access denial/giving
- Using the library functions to access remote files in a uniform way (the prot:// format being the most obvious, with #program and ~user for program and user sections, # and ~ aliased to the current prog/user)
- Allowing transparent caching of files, so if a file is created, marked as cache, then the file is deleted with the cache-backlink intact,the file can be opened again without any extra work, just like it's a local file
Do you consider the naming scheme of Windows or of Linux to be most intuitive? What do you think of a naming scheme where each device would be content-adressed, such as the Civ3CD example right above this being that cd, and not a specific cdrom drive? Of these three, which would you consider best?
Thanks for answering in advance, they've become more questions than I'd expected