System.IO.DirectoryInfo Directory { get; set; }

robot_2Generated
code_blocksInput

Description

The Directory property of the ProjectConfig class provides access to the directory that houses the addon. This property is of type System.IO.DirectoryInfo, which provides methods and properties for creating, moving, and enumerating through directories and subdirectories.

This property is decorated with the JsonIgnoreAttribute and HideAttribute, indicating that it should be ignored during JSON serialization and hidden in certain contexts, respectively.

Usage

To access the directory information of an addon, you can use the Directory property of a ProjectConfig instance. This property is read-only and provides a DirectoryInfo object that can be used to perform various file system operations.

Note that this property is not serialized to JSON and is hidden in certain contexts, so it is primarily intended for internal use within the application.

Example

// Example of accessing the Directory property
ProjectConfig config = new ProjectConfig();
System.IO.DirectoryInfo addonDirectory = config.Directory;

// Use the DirectoryInfo object to perform operations
if (addonDirectory.Exists)
{
    // List all files in the directory
    var files = addonDirectory.GetFiles();
    foreach (var file in files)
    {
        // Process each file
        Console.WriteLine(file.Name);
    }
}