fileio

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fileio provides convenient functions for reading and writing files and directories to a filesystem They may not be the most efficient implementations but the focus is on ease of use

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) bool

DirExists checks if a path exists and is a directory.

func FileExists

func FileExists(path string) bool

FileExists checks if a path exists and is a file.

func ReadFile

func ReadFile(filePath string) ([]byte, error)

ReadFile reads the file at the given path into memory and returns its contents as a byte slice. If the file does not exist, an error is returned.

func WriteFile

func WriteFile(data []byte, filePath string) error

WriteFile writes the given data to a file at the given path. It creates the file if it does not exist, and overwrites it if it does. If directories in the file path do not exist, they are created.

Types

This section is empty.

Jump to

Keyboard shortcuts

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