fs
Package fs provides fs.promises-style file operations with context.Context.
import "github.com/sahilkhaire/gox/fs"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Copy | fs.copyFile(src, dst) | func | Copy copies src to dst (fs.promises.copyFile). |
| Exists | fs.exists(path) | func | Exists reports whether path exists. |
| Mkdir | fs.mkdir(path) | func | Mkdir creates a directory (fs.promises.mkdir). |
| ReadDir | fs.readdir(path) | func | ReadDir reads directory entries (fs.promises.readdir). |
| ReadFile | fs.readFile(path) | func | ReadFile reads path (fs.promises.readFile). |
| Remove | fs.rm(path) | func | Remove deletes path (fs.promises.rm). |
| Stat | fs.stat(path) | func | Stat returns file info (fs.promises.stat). |
| WriteFile | fs.writeFile(path, data) | func | WriteFile writes data to path (fs.promises.writeFile). |