Kaynağa Gözat

doc: document event core.fs.create.directory

issue: https://github.com/HeyPuter/puter/issues/1122
KernelDeimos 2 ay önce
ebeveyn
işleme
3bd12fb5f2

+ 18 - 0
doc/contributors/extensions/events.json.js

@@ -47,4 +47,22 @@ export default [
             `
         }
     },
+    {
+        id: 'core.fs.create.directory',
+        description: `
+            This event is emitted when a directory is created.
+        `,
+        properties: {
+            node: {
+                type: 'FSNodeContext',
+                mutability: 'no-effect',
+                summary: 'the directory that was created',
+            },
+            context: {
+                type: 'Context',
+                mutability: 'no-effect',
+                summary: 'current context'
+            },
+        }
+    },
 ];

+ 24 - 2
doc/contributors/extensions/events.md

@@ -8,21 +8,25 @@ The event can be used to block certain emails from being validated.
 the email being validated
 - **Type**: string
 - **Mutability**: no-effect
-- **Notes**: undefined
+- **Notes**:
   - The email may have already been cleaned.
+
 #### Property `allow`
 
 whether the email is allowed
 - **Type**: boolean
 - **Mutability**: mutable
-- **Notes**: undefined
+- **Notes**:
   - If set to false, the email will be considered invalid.
 
+
 ### `core.request.measured`
 
 This event is emitted when a requests incoming and outgoing bytes
 have been measured.
 
+#### Example
+
 ```javascript
 extension.on('core.request.measured', data => {
     const measurements = data.measurements;
@@ -36,3 +40,21 @@ extension.on('core.request.measured', data => {
     });
 });
 ```
+
+### `core.fs.create.directory`
+
+This event is emitted when a directory is created.
+
+#### Property `node`
+
+the directory that was created
+- **Type**: FSNodeContext
+- **Mutability**: no-effect
+
+#### Property `context`
+
+current context
+- **Type**: Context
+- **Mutability**: no-effect
+
+