cpptooling.utility.virtualfilesystem

Members

Functions

slice
T slice(ref VirtualFileSystem vfs, SourceLocation sloc)

** Returns: a slice starting at the offset of the SourceLocation. */

slice
T slice(ref VirtualFileSystem vfs, SourceRange srange)
slice
T slice(ref VirtualFileSystem vfs, FileName fname)
toClangFiles
CXUnsavedFile[] toClangFiles(ref VirtualFileSystem vfs)

Trusted because: -

Structs

VirtualFileSystem
struct VirtualFileSystem

File layer abstracting the handling of in-memory files and concrete filesystem files.

Meta

Authors

Joakim Brännström (joakim.brannstrom@gmx.com)

This Source Code Form is subject to the terms of the Mozilla Public License, v.2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Abstractions for easier usage of clang with in-memory files.

An user of Clang and especially SourceRanges/SourceLocation shouldn't need to keep track of which files are from the filesystem, which are from the in-memory cache.

The VFS provides an agnostic access to files both in-memory and on the filesystem with helper functions for SourceRange/SourceLocation.

TODO this is deprecated. Migrate to using dextool.vfs.

License

MPL-2