appendToFile method

void appendToFile(
  1. String filePath,
  2. String content
)

Appends content to an existing file

filePath - Full file path content - Content to append

Implementation

void appendToFile(String filePath, String content) {
  createDir(dirname(filePath));
  filePath.append(content);
}