🤖
Cubed-API
  • Cubed-API
  • Tutorials & Guides
    • Installing Cubed-API
    • Session IDs
    • Logging Into An Account
    • Selecting A Server To Edit
  • Documentation
    • login
    • getServers
    • selectServer
    • validate
    • Files
      • getFolder
      • read
      • edit
      • delete
      • createFolder
      • create
    • API
      • servers
      • server
      • topboosted
      • topvoted
      • player
        • bedwars
        • tntwars
        • warzone
        • info
    • utils
      • orderServers
      • playerUUID
  • Terms Of Use
  • Source Code (GitHub)
Powered by GitBook
On this page
  1. Documentation
  2. Files

create

.create() is used to create a new file

PreviouscreateFolderNextAPI

Last updated 4 years ago

Was this helpful?

CtrlK

Was this helpful?

.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');

Read the guide on session IDs: https://pondwadermc.gitbook.io/cubed-api/tutorials-and-guides/sessions