Giter Club home page Giter Club logo

ttvfs's Introduction

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.


-------------------------------

ttvfs's People

Contributors

fgenesis avatar

Watchers

Chica avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.