Documentation ¶
Index ¶
- func Chdir(dir string) error
- func Chmod(name string, mode os.FileMode) error
- func Chown(name string, uid, gid int) error
- func Chtimes(name string, atime time.Time, mtime time.Time) error
- func Create(name string) (*os.File, error)
- func Lchown(name string, uid, gid int) error
- func Link(oldname, newname string) error
- func Lstat(name string) (os.FileInfo, error)
- func Mkdir(name string, perm os.FileMode) error
- func MkdirAll(path string, perm os.FileMode) error
- func NewFile(fd uintptr, name string) *os.File
- func Open(name string) (*os.File, error)
- func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)
- func Readlink(name string) (string, error)
- func Remove(name string) error
- func RemoveAll(path string) error
- func Rename(oldpath, newpath string) error
- func Stat(name string) (os.FileInfo, error)
- func Symlink(oldname, newname string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chdir ¶
Chdir changes the current working directory to the named directory. If there is an error, it will be of type *PathError.
func Chmod ¶
Chmod changes the mode of the named file to mode. If the file is a symbolic link, it changes the mode of the link's target. If there is an error, it will be of type *PathError.
func Chown ¶
Chown changes the numeric uid and gid of the named file. If the file is a symbolic link, it changes the uid and gid of the link's target. If there is an error, it will be of type *PathError.
func Chtimes ¶
Chtimes changes the access and modification times of the named file, similar to the Unix utime() or utimes() functions.
The underlying filesystem may truncate or round the values to a less precise time unit. If there is an error, it will be of type *PathError.
func Create ¶
Create creates the named file with mode 0666 (before umask), truncating it if it already exists. If successful, methods on the returned File can be used for I/O; the associated file descriptor has mode O_RDWR. If there is an error, it will be of type *PathError.
func Lchown ¶
Lchown changes the numeric uid and gid of the named file. If the file is a symbolic link, it changes the uid and gid of the link itself. If there is an error, it will be of type *PathError.
func Link ¶
Link creates newname as a hard link to the oldname file. If there is an error, it will be of type *LinkError.
func Lstat ¶
Lstat returns a FileInfo describing the named file. If the file is a symbolic link, the returned FileInfo describes the symbolic link. Lstat makes no attempt to follow the link. If there is an error, it will be of type *PathError.
func Mkdir ¶
Mkdir creates a new directory with the specified name and permission bits. If there is an error, it will be of type *PathError.
func MkdirAll ¶
MkdirAll creates a directory named path, along with any necessary parents, and returns nil, or else returns an error. The permission bits perm are used for all directories that MkdirAll creates. If path is already a directory, MkdirAll does nothing and returns nil.
func Open ¶
Open opens the named file for reading. If successful, methods on the returned file can be used for reading; the associated file descriptor has mode O_RDONLY. If there is an error, it will be of type *PathError.
func OpenFile ¶
OpenFile is the generalized open call; most users will use Open or Create instead. It opens the named file with specified flag (O_RDONLY etc.) and perm, (0666 etc.) if applicable. If successful, methods on the returned File can be used for I/O. If there is an error, it will be of type *PathError.
func Readlink ¶
Readlink returns the destination of the named symbolic link. If there is an error, it will be of type *PathError.
func Remove ¶
Remove removes the named file or directory. If there is an error, it will be of type *PathError.
func RemoveAll ¶
RemoveAll removes path and any children it contains. It removes everything it can but returns the first error it encounters. If the path does not exist, RemoveAll returns nil (no error).
func Rename ¶
Rename renames (moves) a file. OS-specific restrictions might apply. If there is an error, it will be of type *LinkError.
Types ¶
This section is empty.