LLVM: llvm::vfs::File Class Reference (original) (raw)
Represents an open file. More...
#include "[llvm/Support/VirtualFileSystem.h](VirtualFileSystem%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| virtual | ~File () |
| Destroy the file after closing it (if open). | |
| virtual llvm::ErrorOr< Status > | status ()=0 |
| Get the status of the file. | |
| virtual llvm::ErrorOr< std::string > | getName () |
| Get the name of the file. | |
| virtual llvm::ErrorOr< std::unique_ptr< llvm::MemoryBuffer > > | getBuffer (const Twine &Name, int64_t FileSize=-1, bool RequiresNullTerminator=true, bool IsVolatile=false)=0 |
| Get the contents of the file as a MemoryBuffer. | |
| virtual std::error_code | close ()=0 |
| Closes the file. |
| Protected Member Functions | |
|---|---|
| virtual void | setPath (const Twine &Path) |
Represents an open file.
Definition at line 113 of file VirtualFileSystem.h.
| File::~File ( ) | virtualdefault |
|---|
Destroy the file after closing it (if open).
Sub-classes should generally call close() inside their destructors. We cannot do that from the base class, since close is virtual.
◆ close()
| virtual std::error_code llvm::vfs::File::close ( ) | pure virtual |
|---|
◆ getBuffer()
◆ getName()
| virtual llvm::ErrorOr< std::string > llvm::vfs::File::getName ( ) | inlinevirtual |
|---|
◆ getWithPath()
◆ setPath()
| virtual void llvm::vfs::File::setPath ( const Twine & Path) | inlineprotectedvirtual |
|---|
◆ status()
Get the status of the file.
Referenced by getName().
The documentation for this class was generated from the following files:
- include/llvm/Support/VirtualFileSystem.h
- lib/Support/VirtualFileSystem.cpp