filesystem

package
v0.0.0-...-7f21a13 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddNewSliceElementsToFile

func AddNewSliceElementsToFile(filePath string, newRepos []string)

addNewSliceElementsToFile given a slice of strings representing paths, stores them to the filesystem addNewSliceElementsToFile given a slice of strings representing paths, stores them to the filesystem

func DumpStringsSliceToFile

func DumpStringsSliceToFile(repos []string, filePath string)

dumpStringsSliceToFile writes content to the file in path `filePath` (overwriting existing content)

func GetDotFilePath

func GetDotFilePath() string

getDotFilePath returns the dot file for the repos list. Creates it and the enclosing folder if it does not exist.

func JoinSlices

func JoinSlices(new []string, existing []string) []string

joinSlices adds the element of the `new` slice into the `existing` slice, only if not already there

func OpenFile

func OpenFile(filePath string) *os.File

openFile opens the file located at `filePath`. Creates it if not existing.

func ParseFileLinesToSlice

func ParseFileLinesToSlice(filePath string) []string

parseFileLinesToSlice given a file path string, gets the content of each line and parses it to a slice of strings.

func SliceContains

func SliceContains(slice []string, value string) bool

sliceContains returns true if `slice` contains `value`

Types

This section is empty.

Jump to

Keyboard shortcuts

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