ReversingSpace / cpp-gamefilesystem

Game and general prototyping filesystem support.
Other
1 stars 2 forks source link

FileSystem API #6

Closed awstanley closed 5 years ago

awstanley commented 5 years ago

As the FileSystem API got hosed during the 2018 API rewrite, it needs to be redesigned.

The various discussions we've had on Discord seem to point to the following considerations:

The issue is two part:

  1. Should there be an imposed read system in front (and if so, should it be templated or plugin-driven to allow a storage server)?;
  2. Should the userland directory be implemented such that it has zero requirements other than a path (i.e. you could use SDL or whatever technique to generate your path, pass it in, and the system interprets and executes it)?

Additional consideration comes from games like Factorio which allow for custom userland directories to be set. I'm not sure if this is a direct point of relevance here.

This library could also use a CMake option to include or exclude preference directory selection (e.g. %APPDATA% for Windows 7, whatever the nominal path is on Windows 8/8.1/10). Such a system would likely require iteration over older directories, though given the Windows 10 minimum, and the common path selection in Windows 7/8/8.1 anyway, it's probably best to use the (Microsoft) prescribed standard (whatever that is at the moment).

awstanley commented 5 years ago

Additional note that storage::Directory is scheduled for removal or redesign.

I can't think of a sane reason to build a directory system when std::filesystem now contains one, but there may be a reason.

The redesign would likely be more for archive/package building, and thus unpacking/extraction should it be needed, though the question becomes whether or not it's worth it.

Adding for consideration: @Brand2 @Legendsmith @metasymphony

awstanley commented 5 years ago

8

Handled by pull request.