gokio

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(from gost.String, to gost.String) gost.Future[gost.Result[any]]

Copies the contents of one file to another. This function will also copy the permission bits of the original file to the destination file. This function will overwrite the contents of to.

func CreateDir

func CreateDir(path gost.String) gost.Future[gost.Result[any]]

Creates a new, empty directory at the provided path

func Read

func Read(path gost.String) gost.Future[gost.Result[[]gost.Byte]]

Read the entire contents of a file into a bytes vector.

func ReadDir

func ReadDir(path gost.String) gost.Future[gost.Result[gost.Vec[gost.DirEntry]]]

Returns an iterator over the entries within a directory.

func ReadToString

func ReadToString(path gost.String) gost.Future[gost.Result[gost.String]]

Read the entire contents of a file into a string.

func RemoveDir

func RemoveDir(path gost.String) gost.Future[gost.Result[any]]

Removes an empty directory.

func RemoveFile

func RemoveFile(path gost.String) gost.Future[gost.Result[any]]

Removes a file from the filesystem.

func Rename

func Rename(from gost.String, to gost.String) gost.Future[gost.Result[any]]

Rename a file or directory to a new name, replacing the original file if to already exists. This will not work if the new name is on a different mount point.

func Spawn

func Spawn[T any](f func() T) gost.Future[T]

func Write

func Write(path gost.String, data []gost.Byte) gost.Future[gost.Result[any]]

Write a slice as the entire contents of a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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