Common functionalities in managing and handling files in GO.
The functions are:
FileExist: Checks if the file exists or not
ByteToBase64: Converts byte array to Base 64
ReadCsvFile: Reads a CSV file and converts the contents to an array of arrays of stringsWriteCsvFile: Receives the content of the CSV file as a slice of string slice and writes it to file
DownloadFileToDisk: Downloads a file and writes it to the diskDownloadFileToBytes: Downloads a file and converts it to[]byteDownloadFileToBase64: Downloads a file and converts to base 64DownloadFileToFile: Downloads a file and converts to a temporaryos.File
ReadFileToBase64NoError: Reads a file and convert it to base 64GetDirFilesFlat: Creates a flat array containing the path to all of the files of a folder and its nested folders.FindFirstFileInFolderContainingText: Returns the first file in a folder (and its nested folders) that has a text
CreateDirIfNotExists: Creates a directory if doesn't exist
ReplaceTextInFile: Replaces a text in a fileInsertTextInFile: Inserts a text before or after a landmark.AppendToFile: Adds a text to the bottom of a file
Copy: Copies a fileCopyDirectory: Copies a directory and its nested foldersCopySymLink: Copies a sym link