fs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 2 Imported by: 5

Documentation

Overview

Package fs provides I/O utility functions for filesystem interactions. Please note that it makes use of the underlying filesystem and only serves as additional utility for the "os" Go standard library package. For more advanced and extended features see packages like https://github.com/spf13/afero instead.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) (bool, error)

DirExists checks if a directory exists. If an error occurs, "false" is returned along with the error.

See

(1) https://en.wikipedia.org/wiki/Directory_(computing)
(2) https://en.wikipedia.org/wiki/Unix_file_types#Directory

func FileExists

func FileExists(path string) (bool, error)

FileExists checks if a regular file or directory exists. If an error occurs, "false" is returned along with the error.

See

(1) https://en.wikipedia.org/wiki/Computer_file
(2) https://en.wikipedia.org/wiki/Unix_file_types

func IsFileWritable

func IsFileWritable(path string) (bool, error)

IsFileWritable checks if a file is writable. If an error occurs, "false" is returned along with the error.

func IsSymlink(path string) (bool, error)

IsSymlink checks if a file is a symbolic link. If an error occurs, "false" is returned along with the error.

See

(1) https://en.wikipedia.org/wiki/Symbolic_link
(2) https://en.wikipedia.org/wiki/Unix_file_types#Symbolic_link

func RegularFileExists

func RegularFileExists(path string) (bool, error)

RegularFileExists checks if a regular file exists. If an error occurs, "false" is returned along with the error.

See

(1) https://en.wikipedia.org/wiki/Unix_file_types#Regular_file
(2) https://en.wikipedia.org/wiki/Computer_file

Types

This section is empty.

Directories

Path Synopsis
Package filepath provides utility functions for manipulating filename paths for the target operating system-defined file paths, using either forward slashes or backslashes.
Package filepath provides utility functions for manipulating filename paths for the target operating system-defined file paths, using either forward slashes or backslashes.

Jump to

Keyboard shortcuts

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