Skip to content
Fabian Hagen edited this page Aug 1, 2016 · 2 revisions

Here is a list of all available functions you can access through an instance of the DotenvEditor. For examples and more details see the detail page of each function.

getBackupPath

Returns the current backup-directory.

setBackupPath

Set the backup-directory for the current instance.

keyExists

Checks, if a key exists or not.

getValue

Returns the value of the given key. If it does not exist, an exception is thrown.

setAutoBackup

Enable or disable auto-backups.

AutoBackupEnabled

Check, if the auto-backup function is activated or not.

createBackup

Create a backup of the currently active .env.

restoreBackup

Restores a given backup.

getBackupVersions

Lists all available backups.

getBackupFile

Returns the path to a given backup.

deleteBackup

Deletes the given backup.

getContent

Returns the content of the given backup or the current .env.

getAsJson

Returns the content as JSON.

changeEnv

Change a value of the current .env.

addData

Adds a new key-value-pair to your current .env.

deleteData

Deletes a key-value-pair from your current .env.