Description
The FileMap
property is a dictionary that maps syntax tree paths from their physical locations to project-local paths. This is useful for managing and organizing code files within a project, ensuring that paths are consistent and relative to the project structure rather than absolute file system paths.
Usage
To use the FileMap
property, you can access it directly from an instance of the CodeArchive
class. You can add, remove, or modify entries in the dictionary to manage the mapping of file paths as needed.
Example
// Example of using the FileMap property
var codeArchive = new CodeArchive();
// Adding a new file path mapping
codeArchive.FileMap["/physical/path/to/file.cs"] = "project/local/path/to/file.cs";
// Retrieving a project local path
string projectLocalPath = codeArchive.FileMap["/physical/path/to/file.cs"];
// Removing a file path mapping
codeArchive.FileMap.Remove("/physical/path/to/file.cs");