Ruina Ruina -4 years ago 123
Javascript Question

Create folder & file plugin Sketch

I'm trying to create a plugin for Sketch that creates a folder and a file inside it on a specific location.

Since the sketch plugins are written with JavaScript I've been searching how to create a folder and/or a file with JavaScript, and then think about the path, but i'm stuck, i couldn't find the answer so i decided to open a thread myself.

The question is: How can i create a folder/file with JavaScript? and how i can choose where i put it?

Any feedback is welcome I'm new to posting here and a noob with programming so feel free to redirect me to documentation and/or tutorials that may be useful for my issue.

Answer Source

The simple answer is you can't. Imagine if any old website could create files and folders on your disk whenever it liked. The security implications would be horrendous.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download