Captures file system interaction and generates data to be later replayed with the RedirectingFileSystem.
Synopsis
Declared in <llvm/Support/FileCollector.h>
class FileCollector
: public FileCollectorBase
Description
For any file that gets accessed we eventually create:
-
a copy of the file inside Root
-
a record in RedirectingFileSystem mapping that maps: current real path ‐> path to the copy in Root
That intent is that later when the mapping is used by RedirectingFileSystem it simulates the state of FS that we collected.
We generate file copies and mapping lazily ‐ see writeMapping and copyFiles. We don't try to capture the state of the file at the exact time when it's accessed. Files might get changed, deleted ... we record only the "final" state.
In order to preserve the relative topology of files we use their real paths as relative paths inside of the Root.
Base Classes
Name |
Description |
Base class for collecting unique file and directory paths. |
Types
Name |
Description |
Helper utility that encapsulates the logic for canonicalizing a virtual path and a path to copy from. |
Member Functions
Name |
Description |
|
Construct a collector that copies accessed files into a replayable overlay. |
Record |
|
Record |
|
Copy the files into the root directory. |
|
Write the yaml mapping (for the VFS) to the given file. |
Static Member Functions
Name |
Description |
Create a VFS that uses |
Protected Member Functions
Name |
Description |
|
Collect |
|
Add a VFS overlay mapping for the canonicalized |
Record |
Protected Data Members
Name |
Description |
Helper utility for canonicalizing paths. |
|
Synchronizes access to internal data structures. |
|
The root directory where the VFS overlay lives. |
|
The directory where collected files are copied to in copyFiles(). |
|
Tracks already seen files so they can be skipped. |
|
The yaml mapping writer. |
Friends
Name |
Description |
Virtual file system that records accessed paths in a FileCollector. |
Created with MrDocs