forked from fgenesis/ttvfs
-
Notifications
You must be signed in to change notification settings - Fork 0
jordicb/ttvfs
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
ttvfs -- tiny tree virtual file system ----------[ TL;DR ]------------ ** Modify VFSDefines.h to your needs, or set the defines in your build system. ** For thread safety, see VFSAtomic.h/.cpp ** You are encouraged to link this library statically. ----------[ Intro ]------------ ttvfs is a small C++ library designed to provide virtual file system support inside of an application. The application can choose to mount files and directories from any source, and access them in a uniform way (similar to fopen(), see examples). This does *not* mean support for fancy 'http://', 'zip://', 'smb://'-like filenames, neither support for accessing archives like directories, as in "./data.zip/file.txt". If such functionality is required, an extension has to be made that generates a file/folder tree that can be used by the library. This means: if you manage to generate a VFS tree from a slice of toast, it can be used. This library is licensed under the MIT license (see below). If you use this code and like it, feel free to send me an email to googlemail.com with false.genesis@ prepended. - that'd make me happy. Patches/improvements are welcome! ----------[ Howto ]------------ Build project/makefiles with CMake. It has sort of sane defaults so it should build out of the box. Some compile flags can be set with CMake, but the preferred way is to edit VFSDefines.h. $ mkdir build $ cd build $ cmake .. $ make This library is intended to be small and extensible, and comes only with a minimal set of classes. It has no dependencies except the STL containers (strings, maps, deques, ...) See VFSFile.h, VFSDir.h, VFSLoader.h for infos about how to write your own classes that add functionality. To add ttvfs to your project, just copy the ttvfs/ subdir, which is the best way in case you are using CMake; if not, copy all files and add them to your build system of choice, or whatever. By default, this library is not thread safe - adding this would bloat it too much. You probably have your own threading library if you care about thread safety, if so, edit VFSAtomic.h/.cpp and add a few lines to glue this lib together with your threading implementation of choice. Be sure to read the comments there! ------- [ Extensions ]-------- * liblvpa: https://github.com/fgenesis/liblvpa -> contains bindings that add support for reading/writing LVPA files (a container file format optimized for games) Made an extension? Let me know, send a mail! ---------[ License ]---------- MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------
About
Tiny tree virtual file system - a small C++ library for app-internal VFS support. Like PhysicsFS.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published