utils

package
v0.0.0-...-439ea99 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

* Copyright Skyramp Authors 2024

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(sourcePath, destinationPath string) error

Copies a file from the sourcePath to the destinationPath. Note: Both source and destination must include the filenames (i.e., not just the directory)

func CreateFile

func CreateFile(destinationPath string, contents []byte) error

func HomeDir

func HomeDir() (home string)

func IsFile

func IsFile(filename string) (bool, error)

IsFile checks if the given path is a file.

func ReadFile

func ReadFile(rootPath, filename string) ([]byte, error)

ReadFile reads a file from the given path. If the path is relative, it will attempt to read the file from the rootPath.

Types

This section is empty.

Jump to

Keyboard shortcuts

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