Sparse Virtual File System  0.4.1
A Sparse Virtual File System.
Classes | Namespaces | Macros | Typedefs
svf.h File Reference
#include <string>
#include <vector>
#include <map>
#include <chrono>
#include <cassert>
#include <mutex>

Go to the source code of this file.

Classes

class  SVFS::Exceptions::ExceptionSparseVirtualFile
 Exception specialisation for the SparseVirtualFile. More...
 
class  SVFS::Exceptions::ExceptionSparseVirtualFileWrite
 Might be thrown during a write operation which fails. More...
 
class  SVFS::Exceptions::ExceptionSparseVirtualFileDiff
 Might be thrown during a write operation where the data differs. More...
 
class  SVFS::Exceptions::ExceptionSparseVirtualFileRead
 Might be thrown during a write operation where the data differs. More...
 
class  SVFS::Exceptions::ExceptionSparseVirtualFileErase
 Might be thrown during a erase operation where the file position is not at the exact beginning of a block. More...
 
struct  SVFS::SparseVirtualFileConfig
 Configuration for the Sparse Virtual File. More...
 
class  SVFS::SparseVirtualFile
 Implementation of a Sparse Virtual File. More...
 
struct  SVFS::SparseVirtualFile::t_val
 Typedef for the data. This allows for extra per-block fields in the future. More...
 

Namespaces

 SVFS
 The namespace for all svfsc code.
 
 SVFS::Exceptions
 The namespace for all Exceptions in svfsc code.
 
 SVFS::Test
 The namespace for all the Test code in svfsc code.
 

Macros

#define SVF_ASSERT(x)   assert(x)
 

Typedefs

typedef size_t SVFS::t_fpos
 
typedef std::pair< t_fpos, size_t > SVFS::t_seek_read
 
typedef std::vector< t_seek_read > SVFS::t_seek_reads
 
typedef uint32_t SVFS::t_block_touch
 
typedef std::map< t_block_touch, t_fpos > SVFS::t_block_touches
 
typedef struct SVFS::SparseVirtualFileConfig SVFS::tSparseVirtualFileConfig
 Configuration for the Sparse Virtual File. More...
 

Detailed Description

A Sparse Virtual File implementation.

Created by Paul Ross on 2020-01-14.

   MIT License

   Copyright (c) 2023-2025 Paul Ross

   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.

Definition in file svf.h.

Macro Definition Documentation

◆ SVF_ASSERT

#define SVF_ASSERT (   x)    assert(x)

If set then SVF_ASSERT(integrity() == ERROR_NONE); in many places which can extend the runtime by x25 or even more.

Definition at line 194 of file svf.h.