create

.create() is used to create a new file

.create(SessionID, folder, name, content)

Create a new file for a server

Parameter

Type

Required

Description

SessionID

string

true

The session ID that you want to perform this action on

folder

string

true

The folder that you wish to create the file in

name

string

true

The name of the file you want to create

content

string

false

The content of the file you'll create

Example:

// Dependencies
const CubedCraft = require('cubed-api');

// Creating the file
CubedCraft.files.create('SessionID', '/plugins/Skript/scripts', 'example.sk');

Last updated

Was this helpful?