virtualfilesystem

Is PhysicsFS platform-independent?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-24 04:56:06
问题 I'm thinking about using PhysicsFS in my game engine project, but I'd like to first make sure it's entirely platform-independent. That's because I'd like to port my engine to some rather obscure platforms after I'm done with the Windows code (Wii Homebrew, for example). 回答1: In accordance with the official specs the developers provide on their site it: Compiles/runs on GNU/Linux (x86, PPC, MIPS, Sparc, Alpha, Itanium, and x86-64 tested; gcc). Compiles/runs on Windows, Win95 and later (x86

How to construct an in-memory virtual file system and then write this structure to disk

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 17:35:37
问题 I'm looking for a way to create a virtual file system in Python for creating directories and files, before writing these directories and files to disk. Using PyFilesystem I can construct a memory filesystem using the following: >>> import fs >>> dir = fs.open_fs('mem://') >>> dir.makedirs('fruit') SubFS(MemoryFS(), '/fruit') >>> dir.makedirs('vegetables') SubFS(MemoryFS(), '/vegetables') >>> with dir.open('fruit/apple.txt', 'w') as apple: apple.write('braeburn') ... 8 >>> dir.tree() ├── fruit

Why doesn't std::istream assume ownership over its streambuf?

微笑、不失礼 提交于 2019-12-10 13:19:27
问题 I am writing some sort of virtual file system library for video-games in the likes of CRI Middleware's ROFS (see Wikipedia). My intention with the library is to provide natural means of accessing the resources of the games I develop, which store some data embedded in the executable, some on the media and some on the local user's hard drive (preferences, save game files, etc). Access to such resources should be as simple as making a call like std::auto_ptr<std::istream> defaultConfigIStream(

.htaccess / https redirection, virtual folder access with exceptions

送分小仙女□ 提交于 2019-12-08 12:39:23
问题 /* THIS would appear to be a duplicate of another question I had asked 10 days back (.htaccess / redirecting to https://www.example.com and virtual folder access), but (a) I didnt get any responses to the changes I made to the question, and (b) this question here is a more complex version of the above and I believe warrants a new query */ I have a site which has the following entities: example.com/index.html example.com/main.php example.com/SPECIAL/main.php besides the above, I have folders

Algorithm for determining a file's identity

£可爱£侵袭症+ 提交于 2019-12-05 00:07:56
问题 For an open source project I have I am writing an abstraction layer on top of the filesystem. This layer allows me to attach metadata and relationships to each file. I would like the layer to handle file renames gracefully and maintain the metadata if a file is renamed / moved or copied. To do this I will need a mechanism for calculating the identity of a file. The obvious solution is to calculate an SHA1 hash for each file and then assign metadata against that hash. But ... that is really

Algorithm for determining a file's identity

别来无恙 提交于 2019-12-03 15:17:55
For an open source project I have I am writing an abstraction layer on top of the filesystem. This layer allows me to attach metadata and relationships to each file. I would like the layer to handle file renames gracefully and maintain the metadata if a file is renamed / moved or copied. To do this I will need a mechanism for calculating the identity of a file. The obvious solution is to calculate an SHA1 hash for each file and then assign metadata against that hash. But ... that is really expensive, especially for movies. So, I have been thinking of an algorithm that though not 100% correct