clang API Documentation

Public Member Functions
clang::vfs::FileSystem Class Reference

The virtual file system interface. More...

#include <VirtualFileSystem.h>

Inheritance diagram for clang::vfs::FileSystem:
Inheritance graph
[legend]
Collaboration diagram for clang::vfs::FileSystem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~FileSystem ()
virtual llvm::ErrorOr< Statusstatus (const Twine &Path)=0
 Get the status of the entry at Path, if one exists.
virtual llvm::ErrorOr
< std::unique_ptr< File > > 
openFileForRead (const Twine &Path)=0
 Get a File object for the file at Path, if one exists.
llvm::ErrorOr< std::unique_ptr
< llvm::MemoryBuffer > > 
getBufferForFile (const Twine &Name, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatile=false)
virtual directory_iterator dir_begin (const Twine &Dir, std::error_code &EC)=0
 Get a directory_iterator for Dir.

Detailed Description

The virtual file system interface.

Definition at line 182 of file VirtualFileSystem.h.


Constructor & Destructor Documentation

FileSystem::~FileSystem ( ) [virtual]

Definition at line 68 of file VirtualFileSystem.cpp.


Member Function Documentation

virtual directory_iterator clang::vfs::FileSystem::dir_begin ( const Twine &  Dir,
std::error_code &  EC 
) [pure virtual]

Get a directory_iterator for Dir.

Note:
The 'end' iterator is directory_iterator().

Implemented in clang::vfs::OverlayFileSystem.

ErrorOr< std::unique_ptr< MemoryBuffer > > FileSystem::getBufferForFile ( const Twine &  Name,
int64_t  FileSize = -1,
bool  RequiresNullTerminator = true,
bool  IsVolatile = false 
)

This is a convenience method that opens a file, gets its content and then closes the file.

Definition at line 71 of file VirtualFileSystem.cpp.

virtual llvm::ErrorOr<std::unique_ptr<File> > clang::vfs::FileSystem::openFileForRead ( const Twine &  Path) [pure virtual]

Get a File object for the file at Path, if one exists.

Implemented in clang::vfs::OverlayFileSystem.

Referenced by clang::FileSystemStatCache::get().

virtual llvm::ErrorOr<Status> clang::vfs::FileSystem::status ( const Twine &  Path) [pure virtual]

Get the status of the entry at Path, if one exists.

Implemented in clang::vfs::OverlayFileSystem.

Referenced by clang::FileSystemStatCache::get().


The documentation for this class was generated from the following files: