Documentation
¶
Overview ¶
Copyright IBM Corp. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
- func CreateDir(dirPath string) error
- func CreateFile(filePath string) error
- func Exists(filePath string) (bool, error)
- func IsDirEmpty(dirPath string) (bool, error)
- func ListSubdirs(dirPath string) ([]string, error)
- func OpenFile(filePath string, perm os.FileMode) (*os.File, error)
- func Remove(path string) error
- func RemoveAll(path string) error
- func SyncDir(dirPath string) error
- func Truncate(f *os.File, toSize int64) error
- func Write(f *os.File, content []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDir ¶
CreateDir creates a dir for dirPath. If the dirPath already exists, it returns nil, i.e., no-op
func CreateFile ¶
CreateFile creates a file. It retuns an error if the file already exists
func IsDirEmpty ¶
IsDirEmpty returns true if the dir at dirPath is empty
func ListSubdirs ¶
ListSubdirs returns the subdirectories
func RemoveAll ¶
RemoveAll removes all files/directories present in the path including the path itself
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.