Skip to content

Commit 0211f5c

Browse files
committed
improved fs
allow overwriting moved file allow overwriting renamed file add LocalAppDataFolder and LocalUserDataFolder add docs about paths
1 parent 3b33755 commit 0211f5c

File tree

8 files changed

+331
-37
lines changed

8 files changed

+331
-37
lines changed

README.md

Lines changed: 115 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A plugin that integrate with Pipelab <br>
55
Author: Armaldio <br>
66
Website: https://github.com/CynToolkit/construct-plugin <br>
77
Addon Url: https://github.com/CynToolkit/construct-plugin <br>
8-
Download Latest Version : [Version: 1.6.0](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
8+
Download Latest Version : [Version: 1.7.1](https://github.com/CynToolkit/construct-plugin/releases/latest) <br>
99
<sub>Made using [c3ide2-framework](https://github.com/ConstructFund/c3ide2-framework) </sub><br>
1010

1111
## Table of Contents
@@ -15,6 +15,7 @@ Download Latest Version : [Version: 1.6.0](https://github.com/CynToolkit/constru
1515
- [Actions](#actions)
1616
- [Conditions](#conditions)
1717
- [Expressions](#expressions)
18+
- [Paths](#paths)
1819
---
1920
## Usage
2021
To build the addon, run the following commands:
@@ -50,15 +51,15 @@ The main files you may want to look at would be instance.js
5051
| --- | --- | --- |
5152
| Initialize integration | Initialize the Pipelab integration | |
5253
| Append file | Appends the contents to the file. | Path *(string)* <br>Contents *(string)* <br> |
53-
| Copy file | Copies the file. | Source *(string)* <br>Destination *(string)* <br> |
54+
| Copy file | Copies the file. | Source *(string)* <br>Destination *(string)* <br>Overwrite *(boolean)* <br> |
5455
| Fetch file size | Fetch the size of the file. | Path *(string)* <br> |
5556
| Create folder | Creates the folder. | Path *(string)* <br> |
56-
| Delete file | Deletes the file. | Path *(string)* <br> |
57+
| Delete file | Deletes the file. | Path *(string)* <br>Recursive *(boolean)* <br> |
5758
| List files | Load a list of files in a given folder. Use expressions after this action to get the count and file names | Path *(string)* <br>Recursive *(boolean)* <br> |
58-
| Move file | Moves the file. | Source *(string)* <br>Destination *(string)* <br> |
59+
| Move file | Moves the file. | Source *(string)* <br>Destination *(string)* <br>Overwrite *(boolean)* <br> |
5960
| Open browser | Opens the browser. | URL *(string)* <br> |
6061
| Read binary file | Reads a file into a Binary Data object. Triggers 'On binary file read' when completes. | Tag *(string)* <br>Path *(string)* <br>Destination *(object)* <br> |
61-
| Rename file | Renames the file. | Source *(string)* <br>Destination *(string)* <br> |
62+
| Rename file | Renames the file. | Existing file *(string)* <br>New name *(string)* <br>Overwrite *(boolean)* <br> |
6263
| Run file | Runs the file. | Path *(string)* <br> |
6364
| Shell open | Opens the file in the shell. | Path *(string)* <br> |
6465
| Explorer open | Opens the path in the explorer. | Path *(string)* <br> |
@@ -129,7 +130,9 @@ The main files you may want to look at would be instance.js
129130
| UserFolder | Return the current User's folder | string | |
130131
| HomeFolder | Return the current Home folder | string | |
131132
| AppDataFolder | Return the current AppDataFolder folder | string | |
133+
| LocalAppDataFolder | Return the current AppDataFolder folder | string | |
132134
| UserDataFolder | Return the current UserDataFolder folder | string | |
135+
| LocalUserDataFolder | Return the current LocalUserDataFolder folder | string | |
133136
| SessionDataFolder | Return the current SessionDataFolder folder | string | |
134137
| TempFolder | Return the current TempFolder folder | string | |
135138
| ExeFolder | Return the current ExeFolder folder | string | |
@@ -149,3 +152,110 @@ The main files you may want to look at would be instance.js
149152
| WindowTitle | Return the title of the window. | string | |
150153
| WindowX | Return the x position of the window. | number | |
151154
| WindowY | Return the y position of the window. | number | |
155+
156+
## Paths
157+
**ProjectFilesFolder**: Direct path to your games's content
158+
- Windows: `C:/Users/quent/AppData/Local/Temp/f0e3c24c1443adce014e5924d5f47e1b571c92e0f29d11d4/build/out/Pipelab-win32-x64/resources/app.asar/src/app`
159+
- Linux:
160+
- MacOS:
161+
162+
UserFolder:
163+
- Windows: ``
164+
- Linux:
165+
- MacOS:
166+
167+
HomeFolder:
168+
- Windows: C:/Users/quent
169+
- Linux:
170+
- MacOS:
171+
172+
AppDataFolder:
173+
- Windows: C:/Users/quent/AppData/Roaming
174+
- Linux:
175+
- MacOS:
176+
177+
LocalAppDataFolder:
178+
- Windows: ``
179+
- Linux:
180+
- MacOS:
181+
182+
UserDataFolder:
183+
- Windows: C:/Users/quent/AppData/Roaming/app
184+
- Linux:
185+
- MacOS:
186+
187+
LocalUserDataFolder:
188+
- Windows: ``
189+
- Linux:
190+
- MacOS:
191+
192+
SessionDataFolder:
193+
- Windows: ``
194+
- Linux:
195+
- MacOS:
196+
197+
TempFolder:
198+
- Windows: ``
199+
- Linux:
200+
- MacOS:
201+
202+
ExeFolder:
203+
- Windows: ``
204+
- Linux:
205+
- MacOS:
206+
207+
ModuleFolder:
208+
- Windows: ``
209+
- Linux:
210+
- MacOS:
211+
212+
DesktopFolder:
213+
- Windows: ``
214+
- Linux:
215+
- MacOS:
216+
217+
DocumentsFolder:
218+
- Windows: ``
219+
- Linux:
220+
- MacOS:
221+
222+
DownloadsFolder:
223+
- Windows: ``
224+
- Linux:
225+
- MacOS:
226+
227+
MusicFolder:
228+
- Windows: ``
229+
- Linux:
230+
- MacOS:
231+
232+
PicturesFolder:
233+
- Windows: ``
234+
- Linux:
235+
- MacOS:
236+
237+
VideosFolder:
238+
- Windows: ``
239+
- Linux:
240+
- MacOS:
241+
242+
RecentFolder:
243+
- Windows: ``
244+
- Linux:
245+
- MacOS:
246+
247+
LogsFolder:
248+
- Windows: ``
249+
- Linux:
250+
- MacOS:
251+
252+
CrashDumpsFolder:
253+
- Windows: C:/Users/quent/AppData/Roaming/app/Crashpad
254+
- Linux:
255+
- MacOS:
256+
257+
AppFolder:
258+
- Windows:
259+
- Linux:
260+
- MacOS:
261+

doc.js

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ readme.push(`- [Properties](#properties)`);
7373
readme.push(`- [Actions](#actions)`);
7474
readme.push(`- [Conditions](#conditions)`);
7575
readme.push(`- [Expressions](#expressions)`);
76+
readme.push(`- [Paths](#paths)`);
7677

7778
readme.push(`---`);
7879
readme.push(`## Usage`);
@@ -262,6 +263,135 @@ Object.keys(config.Exps).forEach((key) => {
262263
`| ${key} | ${expression.description} | ${expression.returnType} | ${paramString} | `
263264
);
264265
});
266+
readme.push(``);
267+
readme.push(`## Paths`);
268+
269+
readme.push('**ProjectFilesFolder**: Direct path to your games\'s content')
270+
readme.push('- Windows: `C:/Users/quent/AppData/Local/Temp/f0e3c24c1443adce014e5924d5f47e1b571c92e0f29d11d4/build/out/Pipelab-win32-x64/resources/app.asar/src/app`')
271+
readme.push('- Linux: ')
272+
readme.push('- MacOS: ')
273+
readme.push('')
274+
275+
readme.push('UserFolder: ')
276+
readme.push('- Windows: ``')
277+
readme.push('- Linux: ')
278+
readme.push('- MacOS: ')
279+
readme.push('')
280+
281+
readme.push('HomeFolder: ')
282+
readme.push('- Windows: C:/Users/quent')
283+
readme.push('- Linux: ')
284+
readme.push('- MacOS: ')
285+
readme.push('')
286+
287+
readme.push('AppDataFolder: ')
288+
readme.push('- Windows: C:/Users/quent/AppData/Roaming')
289+
readme.push('- Linux: ')
290+
readme.push('- MacOS: ')
291+
readme.push('')
292+
293+
readme.push('LocalAppDataFolder: ')
294+
readme.push('- Windows: ``')
295+
readme.push('- Linux: ')
296+
readme.push('- MacOS: ')
297+
readme.push('')
298+
299+
readme.push('UserDataFolder: ')
300+
readme.push('- Windows: C:/Users/quent/AppData/Roaming/app')
301+
readme.push('- Linux: ')
302+
readme.push('- MacOS: ')
303+
readme.push('')
304+
305+
readme.push('LocalUserDataFolder: ')
306+
readme.push('- Windows: ``')
307+
readme.push('- Linux: ')
308+
readme.push('- MacOS: ')
309+
readme.push('')
310+
311+
readme.push('SessionDataFolder: ')
312+
readme.push('- Windows: ``')
313+
readme.push('- Linux: ')
314+
readme.push('- MacOS: ')
315+
readme.push('')
316+
317+
readme.push('TempFolder: ')
318+
readme.push('- Windows: ``')
319+
readme.push('- Linux: ')
320+
readme.push('- MacOS: ')
321+
readme.push('')
322+
323+
readme.push('ExeFolder: ')
324+
readme.push('- Windows: ``')
325+
readme.push('- Linux: ')
326+
readme.push('- MacOS: ')
327+
readme.push('')
328+
329+
readme.push('ModuleFolder: ')
330+
readme.push('- Windows: ``')
331+
readme.push('- Linux: ')
332+
readme.push('- MacOS: ')
333+
readme.push('')
334+
335+
readme.push('DesktopFolder: ')
336+
readme.push('- Windows: ``')
337+
readme.push('- Linux: ')
338+
readme.push('- MacOS: ')
339+
readme.push('')
340+
341+
readme.push('DocumentsFolder: ')
342+
readme.push('- Windows: ``')
343+
readme.push('- Linux: ')
344+
readme.push('- MacOS: ')
345+
readme.push('')
346+
347+
readme.push('DownloadsFolder: ')
348+
readme.push('- Windows: ``')
349+
readme.push('- Linux: ')
350+
readme.push('- MacOS: ')
351+
readme.push('')
352+
353+
readme.push('MusicFolder: ')
354+
readme.push('- Windows: ``')
355+
readme.push('- Linux: ')
356+
readme.push('- MacOS: ')
357+
readme.push('')
358+
359+
readme.push('PicturesFolder: ')
360+
readme.push('- Windows: ``')
361+
readme.push('- Linux: ')
362+
readme.push('- MacOS: ')
363+
readme.push('')
364+
365+
readme.push('VideosFolder: ')
366+
readme.push('- Windows: ``')
367+
readme.push('- Linux: ')
368+
readme.push('- MacOS: ')
369+
readme.push('')
370+
371+
readme.push('RecentFolder: ')
372+
readme.push('- Windows: ``')
373+
readme.push('- Linux: ')
374+
readme.push('- MacOS: ')
375+
readme.push('')
376+
377+
readme.push('LogsFolder: ')
378+
readme.push('- Windows: ``')
379+
readme.push('- Linux: ')
380+
readme.push('- MacOS: ')
381+
readme.push('')
382+
383+
readme.push('CrashDumpsFolder: ')
384+
readme.push('- Windows: C:/Users/quent/AppData/Roaming/app/Crashpad')
385+
readme.push('- Linux: ')
386+
readme.push('- MacOS: ')
387+
readme.push('')
388+
389+
readme.push('AppFolder: ')
390+
readme.push('- Windows: ')
391+
readme.push('- Linux: ')
392+
readme.push('- MacOS: ')
393+
readme.push('')
394+
265395
readme.push(``);
266396

267397
// Object.keys(config.Exps).forEach((key) => {

examples/example.c3p

-16 Bytes
Binary file not shown.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"dependencies": {
3-
"@pipelab/core": "1.4.3",
3+
"@pipelab/core": "1.4.4",
44
"adm-zip": "0.5.16",
55
"chokidar": "4.0.3",
66
"cors": "2.8.5",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)