fileutils

package
v0.0.0-...-c0e28cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package fileutils provides utility functions for working with files and directories

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDataDirectory

func CreateDataDirectory(dirOut string) error

CreateDataDirectory creates the data directory if it does not exist

func DeleteDirectoryIfEmpty

func DeleteDirectoryIfEmpty(dirPath string) error

DeleteDirectoryIfEmpty deletes the directory if it is empty - used for cleaning up data directories

func DirExists

func DirExists(filename string) bool

DirExists checks if a directory exists

func DownloadFile

func DownloadFile(url, outputPath string, maxRetries int) error

DownloadFile downloads a file from a URL and saves it to the specified path, retry if needed

func FileExists

func FileExists(filename string) bool

FileExists checks if a file exists

func ReadGZFileByLine

func ReadGZFileByLine(filePath string) ([]string, error)

ReadGZFileByLine reads a .gz file line by line and returns a slice of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL