![]() |
Geometrize
1.0
An application for geometrizing images into geometric primitives
|
Functions | |
void | debugBreak () |
debugBreak Forces the debugger to break/halt the application when this is called. More... | |
void | printToConsole (const std::string &str) |
printToConsole A convenience function for printing a string to the command-line console. More... | |
void | printToAllScriptConsoleWidgets (const std::string &str) |
printToAllScriptConsoleWidgets A convenience function for printing a string to all the GUI console widgets in the application More... | |
void | messageBox (const std::string &str) |
messageBox A convenience function for displaying a message box containing a message. More... | |
void | processApplicationEvents () |
processApplicationEvents Processes all pending application events for the calling thread. More... | |
bool | fileExists (const std::string &filePath) |
fileExists Checks if a file exists, returns true if it does. More... | |
bool | directoryExists (const std::string &dirPath) |
directoryExists Checks if a directory exists, returns true if it does. More... | |
bool | directoriesExist (const std::vector< std::string > &dirPaths) |
directoriesExist Checks if the given directories exist, returns true if all do. More... | |
bool | directoryContainsFile (const std::string &dirPath, const std::string &fileName) |
directoryContainsFile Checks if the directory contains the given file, returns true if it does. More... | |
bool | createDirectory (const std::string &dirPath) |
createDirectory Creates the directory at the given path, recursively creating subdirectories if needed More... | |
std::string | readFileAsString (const std::string &filePath) |
readFileAsString Reads a file, returning a string containing the contents. More... | |
std::vector< std::string > | getFilePathsForDirectory (const std::string &dirPath) |
getFilePathsForDirectory Gets the absolute file paths to the files in the given directory. More... | |
std::vector< std::string > | getSubdirectoriesForDirectory (const std::string &dirPath) |
getSubdirectoriesForDirectory Gets the absolute paths for direct subdirectories of the given directory. More... | |
bool | endsWith (const std::string &value, const std::string &ending) |
std::vector< std::string > | getFilesWithExtension (const std::string &dirPath, const std::string &extension) |
getFilesWithExtension Gets the absolute file paths to the files with the given extension in the given directory. More... | |
std::string | getFirstFileWithExtension (const std::string &dirPath, const std::string &extension) |
getFirstFileWithExtension Gets the absolute file path to the first file with the given extension in the given directory. More... | |
std::string | getFirstFileWithExtensions (const std::string &dirPath, const std::vector< std::string > &extensions) |
getFirstFileWithExtensions Gets the absolute file path to the first file with one of the given extensions in the given directory. More... | |
std::vector< std::string > | getScriptsForPath (const std::string &path) |
getScriptsForPath Gets the absolute file paths to the script files (*.chai) for the given directory, using recursive search. More... | |
std::vector< std::string > | getScriptsForPaths (const std::vector< std::string > &dirPaths) |
getScriptsForPaths Gets the absolute file paths to the script files (*.chai) for the given directories, using recursive search. More... | |
std::string | getDirectoryForFilePath (const std::string &filePath) |
getDirectoryForFilePath Gets the directory path from the given local file path. More... | |
std::string | getFileNameForFilePath (const std::string &filePath) |
getFileNameForFilePath Gets the filename from the given local file path. More... | |
bool | openInDefaultApplication (const std::string &path) |
openInDefaultApplication Opens the given path in the default application. More... | |
bool | revealInDefaultApplication (const std::string &path) |
revealInDefaultApplication Reveals the given path in the parent folder (or path with the filename trimmed). More... | |
void | clearGlobalClipboard () |
clearGlobalClipboard Clears the global system clipboard contents. More... | |
std::string | getGlobalClipboardText () |
getGlobalClipboardText Gets the global system clipboard text. More... | |
void | setGlobalClipboardText (const std::string &text) |
setClipboardText Sets the global system clipboard text. More... | |
bool | stringBeginsWith (const std::string &str, const std::string &prefix) |
stringBeginsWith Checks if a string begins with the given prefix. More... | |
bool | stringEndsWith (const std::string &str, const std::string &suffix) |
stringEndsWith Checks if a string ends with the given suffix. More... | |
std::string | getApplicationDirectoryLocation () |
getApplicationDirectory Get directory that the application is in. More... | |
std::string | getAppDataLocation () |
getAppDataLocation Returns a directory location where persistent application data can be stored. More... | |
std::string | getHomeDirectoryLocation () |
getHomeDirectoryLocation Returns a path to where the user's home directory is. More... | |
std::string | getDesktopDirectoryLocation () |
getDesktopDirectoryLocation Returns a path to where the user's desktop is. More... | |
bool | writeStringToFile (const std::string &str, const std::string &path) |
writeStringToFile Writes the string to the file path, attempting to overwrite any existing file at the path. More... | |
std::string | percentEncode (const std::string &str) |
percentEncode Returns a percent-encoded copy of the input string. More... | |
int | randomInRange (int lower, int upper) |
randomInRange Returns a random integer in the range [lower, upper], inclusive. Note that this uses thread-local RNGs under the hood. This must not be called on the same thread as the Geometrize shape mutation code - otherwise the shape generation may not be deterministic. More... | |
std::vector< std::string > | split (const std::string &s, char delimiter) |
split Splits a given string into a vector of tokens using the given delimiter. More... | |
int | getCursorX () |
getCursorX Gets the x-coordinate of the cursor in global screen coordinates. More... | |
int | getCursorY () |
getCursorY Gets the y-coordinate of the cursor in global screen coordinates. More... | |
void | setCursorPos (int x, int y) |
setCursorPos Sets the cursor position in global screen coordinates. More... | |
std::string | getOperatingSystemProductType () |
getOperatingSystemProductType Returns the product name of the operating system this application is running in. More... | |
bool | saveWidgetScreenshot (const std::string &path, QWidget *widget) |
saveWidgetScreenshot Takes a screenshot of the given widget and saves it as a .png image to the given path. More... | |
std::vector< std::string > | getAllNamedWidgets () |
getAllWidgetNames Returns a vector containing the names of all the existing widgets in the application More... | |
std::vector< std::string > | getAllNamedGeometrizeWidgets () |
getAllWidgetNames Returns a vector containing the names of all the widgets in the application with "geometrize" in their name More... | |
QWidget * | getWidgetByName (const std::string &widgetName) |
getWidgetByName Returns the first found instance of the existing widget with the given name More... | |
std::vector< std::string > | getAllNamedCommandHandlers () |
getAllNamedCommandHandlers Gets all of the existing objects in the application that implement the CommandHandler interface and can be addressed by name More... | |
geometrize::script::CommandHandler * | getCommandHandlerByName (const std::string &name) |
getCommandHandlerByName Returns the first found instance of the existing command handler with the given name More... | |
void | sendCommand (const std::string &target, const std::string &command) |
sendCommand Sends a command to the given command handler More... | |
void | sendCommand (const std::string &target, geometrize::script::Command &command) |
sendCommand Sends a command to the given command handler More... | |
void | broadcastCommand (const std::string &command) |
broadcastCommand Sends a command to all command handlers More... | |
void | broadcastCommand (geometrize::script::Command &command) |
broadcastCommand Sends a command to all command handlers More... | |
std::string | getFormattedTimestamp (const std::string &formatString) |
getFormattedTimestamp Gets a formatted timestamp for the current local time More... | |
std::string | getFilenameTimestamp () |
getFilenameTimestamp Gets a filename timestamp string for the current local time More... | |
std::string | getUuidString () |
getUuidString Gets a Universally Unique Identifier (UUID) as a string More... | |
void | setWidgetSize (QWidget *widget, int width, int height) |
setWidgetSize Sets the size of the given widget in pixels. More... | |
void | setWidgetPosition (QWidget *widget, int x, int y) |
setWidgetPosition Sets the widget to the given position. More... | |
void | arrangeWidgetsInGrid (const std::vector< QWidget * > &widgets, int centerX, int centerY, int xDim, int yDim, int resizeX, int resizeY) |
arrangeWidgetsInGrid Arranges the given widgets into a grid shape More... | |
void | arrangeImageTaskWidgetsInGrid (int centerX, int centerY, int xDim, int yDim, int resizeX, int resizeY) |
arrangeImageTaskWidgetsInGrid Arranges all the open image task widgets into a grid shape More... | |
void | arrangeWidgetsInGridOnMonitor (const std::vector< QWidget * > &widgets, int screenIdx, int resizeX, int resizeY) |
arrangeWidgetsInGridOnMonitor Arranges the given widgets into a grid on the given monitor More... | |
void | arrangeImageTaskWidgetsInGridOnMonitor (int screenIdx, int resizeX, int resizeY) |
arrangeImageTaskWidgetsInGridOnMonitor Arranges all the open image task widgets into a grid on the given monitor More... | |
void | arrangeWidgetsInGridOnPrimaryMonitor (const std::vector< QWidget * > &widgets, int resizeX, int resizeY) |
arrangeWidgetsInGridOnPrimaryMonitor Arranges the given widgets into a grid on the primary monitor More... | |
void | arrangeImageTaskWidgetsInGridOnPrimaryMonitor (int resizeX, int resizeY) |
arrangeImageTaskWidgetsInGridOnPrimaryMonitor Arranges all the open image task widgets into a grid on the given monitor More... | |
void | fitWidgetsInGridOnMonitor (const std::vector< QWidget * > &widgets, int screenIdx) |
fitWidgetsInGridOnMonitor Fits the given widgets into a grid on the given monitor More... | |
void | fitImageTaskWidgetsInGridOnMonitor (int screenIdx) |
fitImageTaskWidgetsInGridOnMonitor Fits all of the open image task widgets into a grid on the given monitor More... | |
void | fitWidgetsInGridOnPrimaryMonitor (const std::vector< QWidget * > &widgets) |
fitWidgetsInGridOnPrimaryMonitor Fits the given widgets into a grid on the primary monitor More... | |
void | fitImageTaskWidgetsInGridOnPrimaryMonitor () |
fitImageTaskWidgetsInGridOnPrimaryMonitor Fits all of the open image task widgets into a grid on the primary monitor More... | |
template<typename T > | |
T | clamp (T value, T lower, T upper) |
clamp Clamps a value within a range. More... | |
template<typename T > | |
void | split (const std::string &s, const char delimiter, T result) |
std::vector< std::string > | readStringVector (const std::string &filePath) |
readStringVector Reads the JSON file containing the vector of strings at the given filepath. Will attempt to overwrite any existing file when it does this. More... | |
void | writeStringVector (const std::vector< std::string > &vec, const std::string &filePath) |
writeStringVector Writes the string vector to the given filepath as JSON. Will attempt to overwrite any existing file. More... | |
void | openTask (const QString &urlStr, bool addToRecents) |
void | openTasks (const QStringList &urls, const bool addToRecents) |
bool | openTemplate (chaiscript::ChaiScript &engine, const std::string &templateFolder) |
TemplateManifest | getTemplateManifest (const std::string &templateFolder) |
void geometrize::util::arrangeImageTaskWidgetsInGrid | ( | int | centerX, |
int | centerY, | ||
int | xDim, | ||
int | yDim, | ||
int | resizeX, | ||
int | resizeY | ||
) |
arrangeImageTaskWidgetsInGrid Arranges all the open image task widgets into a grid shape
centerX | The x coordinate of where to center the grid |
centerY | The y coordinate of where to center the grid |
xDim | The number of widgets to lay out horizontally |
yDim | The number of widgets to lay out vertically |
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::arrangeImageTaskWidgetsInGridOnMonitor | ( | int | screenIdx, |
int | resizeX, | ||
int | resizeY | ||
) |
arrangeImageTaskWidgetsInGridOnMonitor Arranges all the open image task widgets into a grid on the given monitor
screenIdx | The index of the screen to center the grid on |
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::arrangeImageTaskWidgetsInGridOnPrimaryMonitor | ( | int | resizeX, |
int | resizeY | ||
) |
arrangeImageTaskWidgetsInGridOnPrimaryMonitor Arranges all the open image task widgets into a grid on the given monitor
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::arrangeWidgetsInGrid | ( | const std::vector< QWidget * > & | widgets, |
int | centerX, | ||
int | centerY, | ||
int | xDim, | ||
int | yDim, | ||
int | resizeX, | ||
int | resizeY | ||
) |
arrangeWidgetsInGrid Arranges the given widgets into a grid shape
widgets | The widgets to arrange |
centerX | The x coordinate of where to center the grid |
centerY | The y coordinate of where to center the grid |
xDim | The number of widgets to lay out horizontally |
yDim | The number of widgets to lay out vertically |
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::arrangeWidgetsInGridOnMonitor | ( | const std::vector< QWidget * > & | widgets, |
int | screenIdx, | ||
int | resizeX, | ||
int | resizeY | ||
) |
arrangeWidgetsInGridOnMonitor Arranges the given widgets into a grid on the given monitor
widgets | The widgets to arrange |
screenIdx | The index of the screen to center the grid on |
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::arrangeWidgetsInGridOnPrimaryMonitor | ( | const std::vector< QWidget * > & | widgets, |
int | resizeX, | ||
int | resizeY | ||
) |
arrangeWidgetsInGridOnPrimaryMonitor Arranges the given widgets into a grid on the primary monitor
widgets | The widgets to arrange |
resizeX | The width to resize the widgets to |
resizeY | The height to resize the widgets to |
void geometrize::util::broadcastCommand | ( | const std::string & | command | ) |
broadcastCommand Sends a command to all command handlers
command | A string representation of the command |
void geometrize::util::broadcastCommand | ( | geometrize::script::Command & | command | ) |
broadcastCommand Sends a command to all command handlers
command | A command object representing the command |
T geometrize::util::clamp | ( | T | value, |
T | lower, | ||
T | upper | ||
) |
clamp Clamps a value within a range.
value | The value to clamp. |
lower | The lower bound of the range. |
upper | The upper bound of the range. |
void geometrize::util::clearGlobalClipboard | ( | ) |
bool geometrize::util::createDirectory | ( | const std::string & | dirPath | ) |
void geometrize::util::debugBreak | ( | ) |
debugBreak Forces the debugger to break/halt the application when this is called.
bool geometrize::util::directoriesExist | ( | const std::vector< std::string > & | dirPaths | ) |
directoriesExist Checks if the given directories exist, returns true if all do.
dirPaths | The directory paths. |
bool geometrize::util::directoryContainsFile | ( | const std::string & | dirPath, |
const std::string & | fileName | ||
) |
directoryContainsFile Checks if the directory contains the given file, returns true if it does.
bool geometrize::util::directoryExists | ( | const std::string & | dirPath | ) |
|
inline |
bool geometrize::util::fileExists | ( | const std::string & | filePath | ) |
void geometrize::util::fitImageTaskWidgetsInGridOnMonitor | ( | int | screenIdx | ) |
fitImageTaskWidgetsInGridOnMonitor Fits all of the open image task widgets into a grid on the given monitor
screenIdx | The index of the screen to center the grid on |
void geometrize::util::fitImageTaskWidgetsInGridOnPrimaryMonitor | ( | ) |
fitImageTaskWidgetsInGridOnPrimaryMonitor Fits all of the open image task widgets into a grid on the primary monitor
void geometrize::util::fitWidgetsInGridOnMonitor | ( | const std::vector< QWidget * > & | widgets, |
int | screenIdx | ||
) |
fitWidgetsInGridOnMonitor Fits the given widgets into a grid on the given monitor
widgets | The widgets to arrange |
screenIdx | The index of the screen to center the grid on |
void geometrize::util::fitWidgetsInGridOnPrimaryMonitor | ( | const std::vector< QWidget * > & | widgets | ) |
fitWidgetsInGridOnPrimaryMonitor Fits the given widgets into a grid on the primary monitor
widgets | The widgets to arrange |
std::vector< std::string > geometrize::util::getAllNamedCommandHandlers | ( | ) |
getAllNamedCommandHandlers Gets all of the existing objects in the application that implement the CommandHandler interface and can be addressed by name
std::vector< std::string > geometrize::util::getAllNamedGeometrizeWidgets | ( | ) |
getAllWidgetNames Returns a vector containing the names of all the widgets in the application with "geometrize" in their name
std::vector< std::string > geometrize::util::getAllNamedWidgets | ( | ) |
getAllWidgetNames Returns a vector containing the names of all the existing widgets in the application
std::string geometrize::util::getAppDataLocation | ( | ) |
getAppDataLocation Returns a directory location where persistent application data can be stored.
std::string geometrize::util::getApplicationDirectoryLocation | ( | ) |
geometrize::script::CommandHandler * geometrize::util::getCommandHandlerByName | ( | const std::string & | name | ) |
getCommandHandlerByName Returns the first found instance of the existing command handler with the given name
name | The name of the command handler to find |
int geometrize::util::getCursorX | ( | ) |
int geometrize::util::getCursorY | ( | ) |
std::string geometrize::util::getDesktopDirectoryLocation | ( | ) |
std::string geometrize::util::getDirectoryForFilePath | ( | const std::string & | filePath | ) |
getDirectoryForFilePath Gets the directory path from the given local file path.
filePath | The filepath to chop. |
std::string geometrize::util::getFileNameForFilePath | ( | const std::string & | filePath | ) |
getFileNameForFilePath Gets the filename from the given local file path.
filePath | The filepath to chop. |
std::string geometrize::util::getFilenameTimestamp | ( | ) |
getFilenameTimestamp Gets a filename timestamp string for the current local time
std::vector< std::string > geometrize::util::getFilePathsForDirectory | ( | const std::string & | dirPath | ) |
getFilePathsForDirectory Gets the absolute file paths to the files in the given directory.
dirPath | The directory to search. |
std::vector< std::string > geometrize::util::getFilesWithExtension | ( | const std::string & | dirPath, |
const std::string & | extension | ||
) |
getFilesWithExtension Gets the absolute file paths to the files with the given extension in the given directory.
dirPath | The directory to search. |
extension | The file extension to match. |
std::string geometrize::util::getFirstFileWithExtension | ( | const std::string & | dirPath, |
const std::string & | extension | ||
) |
getFirstFileWithExtension Gets the absolute file path to the first file with the given extension in the given directory.
dirPath | The directory to search. |
extension | The file extension to match. |
std::string geometrize::util::getFirstFileWithExtensions | ( | const std::string & | dirPath, |
const std::vector< std::string > & | extensions | ||
) |
getFirstFileWithExtensions Gets the absolute file path to the first file with one of the given extensions in the given directory.
dirPath | The directory to search. |
extensions | The file extension to match. |
std::string geometrize::util::getFormattedTimestamp | ( | const std::string & | formatString | ) |
getFormattedTimestamp Gets a formatted timestamp for the current local time
formatString | The format of the timestamp e.g. "ddMMyyyy-hhmmss" |
std::string geometrize::util::getGlobalClipboardText | ( | ) |
std::string geometrize::util::getHomeDirectoryLocation | ( | ) |
std::string geometrize::util::getOperatingSystemProductType | ( | ) |
getOperatingSystemProductType Returns the product name of the operating system this application is running in.
std::vector< std::string > geometrize::util::getScriptsForPath | ( | const std::string & | path | ) |
getScriptsForPath Gets the absolute file paths to the script files (*.chai) for the given directory, using recursive search.
dirPath | The directory to search. |
std::vector< std::string > geometrize::util::getScriptsForPaths | ( | const std::vector< std::string > & | dirPaths | ) |
getScriptsForPaths Gets the absolute file paths to the script files (*.chai) for the given directories, using recursive search.
dirPaths | The directories to search. |
std::vector< std::string > geometrize::util::getSubdirectoriesForDirectory | ( | const std::string & | dirPath | ) |
getSubdirectoriesForDirectory Gets the absolute paths for direct subdirectories of the given directory.
dirPath | The directory to search. |
TemplateManifest geometrize::util::getTemplateManifest | ( | const std::string & | templateFolder | ) |
std::string geometrize::util::getUuidString | ( | ) |
QWidget * geometrize::util::getWidgetByName | ( | const std::string & | widgetName | ) |
getWidgetByName Returns the first found instance of the existing widget with the given name
widgetName | The name of the widget to find |
void geometrize::util::messageBox | ( | const std::string & | str | ) |
bool geometrize::util::openInDefaultApplication | ( | const std::string & | path | ) |
openInDefaultApplication Opens the given path in the default application.
path | The path to the resource to open. |
void geometrize::util::openTask | ( | const QString & | urlStr, |
bool | addToRecents | ||
) |
void geometrize::util::openTasks | ( | const QStringList & | urls, |
const bool | addToRecents | ||
) |
bool geometrize::util::openTemplate | ( | chaiscript::ChaiScript & | engine, |
const std::string & | templateFolder | ||
) |
std::string geometrize::util::percentEncode | ( | const std::string & | str | ) |
percentEncode Returns a percent-encoded copy of the input string.
str | The input string, to be percent-encoded. |
void geometrize::util::printToAllScriptConsoleWidgets | ( | const std::string & | str | ) |
printToAllScriptConsoleWidgets A convenience function for printing a string to all the GUI console widgets in the application
str | The string to print to the script console widgets. |
void geometrize::util::printToConsole | ( | const std::string & | str | ) |
void geometrize::util::processApplicationEvents | ( | ) |
processApplicationEvents Processes all pending application events for the calling thread.
int geometrize::util::randomInRange | ( | int | lower, |
int | upper | ||
) |
randomInRange Returns a random integer in the range [lower, upper], inclusive. Note that this uses thread-local RNGs under the hood. This must not be called on the same thread as the Geometrize shape mutation code - otherwise the shape generation may not be deterministic.
lower | The minimum value. |
upper | The maximum value. |
std::string geometrize::util::readFileAsString | ( | const std::string & | filePath | ) |
readFileAsString Reads a file, returning a string containing the contents.
filePath | The path to the file. |
std::vector< std::string > geometrize::util::readStringVector | ( | const std::string & | filePath | ) |
readStringVector Reads the JSON file containing the vector of strings at the given filepath. Will attempt to overwrite any existing file when it does this.
filePath | The path to the file to read. |
bool geometrize::util::revealInDefaultApplication | ( | const std::string & | path | ) |
revealInDefaultApplication Reveals the given path in the parent folder (or path with the filename trimmed).
path | The path to the resource to view. |
bool geometrize::util::saveWidgetScreenshot | ( | const std::string & | path, |
QWidget * | widget | ||
) |
saveWidgetScreenshot Takes a screenshot of the given widget and saves it as a .png image to the given path.
path | The file path to save the screenshot to. |
widget | The widget to take a screenshot of. |
void geometrize::util::sendCommand | ( | const std::string & | target, |
const std::string & | command | ||
) |
sendCommand Sends a command to the given command handler
target | The name of the target command handler |
command | A string representation of the command |
void geometrize::util::sendCommand | ( | const std::string & | target, |
geometrize::script::Command & | command | ||
) |
sendCommand Sends a command to the given command handler
target | The name of the target command handler |
command | A command object representing the command |
void geometrize::util::setCursorPos | ( | int | x, |
int | y | ||
) |
void geometrize::util::setGlobalClipboardText | ( | const std::string & | text | ) |
void geometrize::util::setWidgetPosition | ( | QWidget * | widget, |
int | x, | ||
int | y | ||
) |
void geometrize::util::setWidgetSize | ( | QWidget * | widget, |
int | width, | ||
int | height | ||
) |
std::vector< std::string > geometrize::util::split | ( | const std::string & | s, |
char | delimiter | ||
) |
split Splits a given string into a vector of tokens using the given delimiter.
s | The string to split. |
delimiter | The delimiter to split on. |
void geometrize::util::split | ( | const std::string & | s, |
const char | delimiter, | ||
T | result | ||
) |
bool geometrize::util::stringBeginsWith | ( | const std::string & | str, |
const std::string & | prefix | ||
) |
stringBeginsWith Checks if a string begins with the given prefix.
str | The string to check. |
prefix | The prefix to check for. |
bool geometrize::util::stringEndsWith | ( | const std::string & | str, |
const std::string & | suffix | ||
) |
stringEndsWith Checks if a string ends with the given suffix.
str | The string to check. |
suffix | The suffix ending to check for. |
bool geometrize::util::writeStringToFile | ( | const std::string & | str, |
const std::string & | path | ||
) |
writeStringToFile Writes the string to the file path, attempting to overwrite any existing file at the path.
str | The string to write to file. |
path | The file path to write to. |
void geometrize::util::writeStringVector | ( | const std::vector< std::string > & | vec, |
const std::string & | filePath | ||
) |
writeStringVector Writes the string vector to the given filepath as JSON. Will attempt to overwrite any existing file.
text | The vector of strings to write. |
filePath | The path of the file to write to. |