storage
Package storage
import "github.com/luxfi/node/utils/storage"Functions
AvailableBytes
func AvailableBytes(path string) (uint64, error)DirSize
func DirSize(path string) (uint64, error)FileExists
func FileExists(filePath string) (bool, error)FileExists checks if a file exists before we try using it to prevent further errors.
FolderExists
func FolderExists(filePath string) (bool, error)FolderExists checks if a folder exists before we try using it to prevent further errors.
ReadFileWithName
func ReadFileWithName(parentDir string, fileNameNoExt string) ([]byte, error)ReadFileWithName reads a single file with name fileNameWithoutExt without specifying any extension. it errors when there are more than 1 file with the given fileName