InoDrive / File / writeModuleConfig


InoDrive.File.writeModuleConfig(content)

Writes module configuration information to the InoDrive Module

Arguments: Content (JSON Object) matching the ModuleConfig format from readModuleConfig()

Returns: Boolean – True or False Value on successfully writing out the Module Configuration File.

// Import InoDrive API Library
 import { InoDriveApiJS }  from ( "ck-inodrive-api" ) 

// Instatiate the API
let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false })

// Instantiate InoDrive Object
Drive = await InoDriveAPI.InoDrive({target:'Name', autoConnect:True})

// Get Module Configuration File
let content= await Drive.UserApp.readModuleConfig()

// Change Module Name
let content.name = "InoDriveFour"

// Write Out to Configuration File
await Drive.UserApp.writeModuleConfig(content)

// Then read the file again to view changes made
console.log(await Drive.UserApp.readModuleConfig())