-
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Pulsar-Native/crates/plugin_editor_api/src/lib.rs
Lines 310 to 344 in 358da2a
| // ============================================================================ | |
| // File Type Definitions | |
| // ============================================================================ | |
| /// Defines the structure of a file type. | |
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | |
| pub enum FileStructure { | |
| /// A single standalone file (e.g., script.rs) | |
| Standalone, | |
| /// A folder that appears as a file in the drawer (e.g., MyClass.class/) | |
| /// Contains the marker file name that identifies this folder as this type | |
| /// For example, "graph_save.json" for blueprint classes | |
| FolderBased { | |
| /// The marker file that must exist in the folder | |
| marker_file: String, | |
| /// Additional files/folders that should be created in a new instance | |
| template_structure: Vec<PathTemplate>, | |
| }, | |
| } | |
| /// Template for creating files/folders in a folder-based file type. | |
| #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | |
| pub enum PathTemplate { | |
| /// Create a file with default content | |
| File { | |
| path: String, | |
| content: String, | |
| }, | |
| /// Create a folder | |
| Folder { | |
| path: String, | |
| }, | |
| } | |
Like this for example:
pub enum PathTemplate {
/// Create a file with default content
File {
path: String,
content: String,
},
/// Create a folder
Folder {
path: String,
template_structure: Option<Vec<PathTemplate>>
},
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Type
Projects
Status
Todo