Contains all helper and utility functions
- Source:
Methods
(inner) appendToFile(filePath, textToAppend)
Appends text to a given filePath
- Source:
Appends text to a given filePath
Parameters:
Name | Type | Description |
---|---|---|
filePath |
string | The path to the file which the text should be appended to |
textToAppend |
string | The actual text which should be appended |
(inner) bytesToSize(bytes)
Calculates bytes to size
- Source:
Calculates bytes to size
Parameters:
Name | Type | Description |
---|---|---|
bytes |
string | The given amount of bytes |
Returns:
The actual size
(inner) createFolder(folderName-)
Creates a given folder
- Source:
Checks if the given path exists, otherwise it creates it
Parameters:
Name | Type | Description |
---|---|---|
folderName- |
string | The given folder path which should be created |
(inner) generateTimestamp() → {string}
Generates a timestamp
- Source:
Generates a timestamp using time-stamp
Returns:
- timestamp - The generates timestamp
- Type
- string
(inner) getFontAwesomeFileIcon(extension) → {string}
Returns a FontAwesome iconCode
- Source:
Gets a given fileextension and returns the related iconCode. This iconCode is then used in the generated output .html
Parameters:
Name | Type | Description |
---|---|---|
extension |
string | The given extension |
Returns:
- iconCode - The matching iconcode for the given extension
- Type
- string
(inner) globalObjectGet(property) → {string}
Gets a value of a single property from the global object in main.js
- Source:
Gets a value of a single property from the global object in main.js
Parameters:
Name | Type | Description |
---|---|---|
property |
String | Name of the property |
Returns:
value - Value of the property
- Type
- string
(inner) globalObjectSet(property, value)
Updates the value of a single property from the global object in main.js
- Source:
Updates the value of a single property from the global object in main.js
Parameters:
Name | Type | Description |
---|---|---|
property |
String | Name of the property |
value |
String | The new value of the property |
(inner) openURL(url)
Opens an url in browser
- Source:
Opens a given url in default browser. This is pretty slow, but got no better solution so far.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | URL string which contains the target url |
(inner) showNotification(message, titleopt)
Shows a desktop notification
- Source:
Shows a desktop notification
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | The notification message text |
|
title |
string |
<optional> |
The title of the desktop notification |
(inner) showNoty(type, message, timeoutopt)
Shows a noty notification
- Source:
Creates an in-app notification using the noty framework
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | Options: alert, success, warning, error, info/information |
|
message |
string | notification text |
|
timeout |
number |
<optional> |
Timevalue, defines how long the message should be displayed. Use 0 for no-timeout |
(inner) userSettingRead(key, optionalUpdateSettingUIopt)
Read a user setting from file
- Source:
Reads a value stored in local storage (for a given key)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
String | Name of local storage key |
|
optionalUpdateSettingUI |
Boolean |
<optional> |
Boolean used for an ugly hack |
(inner) userSettingWrite(key, value, silentopt)
Write a user setting to file
- Source:
Writes a value for a given key to electron-json-storage
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
String | Name of storage key |
|
value |
String | New value |
|
silent |
boolean |
<optional> |
If true - no notification is displayed on initial settingscreation |
Throws:
Exception when writing a file failed
(inner) writeConsoleMsg(type, message)
Writes console output for the renderer process
- Source:
Writes console output for the renderer process
Parameters:
Name | Type | Description |
---|---|---|
type |
string | String which defines the log type |
message |
string | String which defines the log message |