fs

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package fs provides Node.js fs module equivalents for transpiled TypeScript code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendFileSync

func AppendFileSync(path string, data string) error

AppendFileSync appends data to a file.

func ChmodSync

func ChmodSync(path string, mode os.FileMode) error

ChmodSync changes file permissions.

func CopyFileSync

func CopyFileSync(src, dst string) error

CopyFileSync copies a file from src to dst.

func ExistsSync

func ExistsSync(path string) bool

ExistsSync returns true if the path exists.

func MkdirSync

func MkdirSync(path string, recursive ...bool) error

MkdirSync creates a directory. With recursive=true, creates parent directories.

func ReadFileSync

func ReadFileSync(path string, encoding ...string) (string, error)

ReadFileSync reads a file and returns its contents as a string.

func ReadFileSyncBytes

func ReadFileSyncBytes(path string) ([]byte, error)

ReadFileSyncBytes reads a file and returns its contents as bytes.

func ReaddirSync

func ReaddirSync(path string) ([]string, error)

ReaddirSync reads a directory and returns entry names.

func RealpathSync

func RealpathSync(path string) (string, error)

RealpathSync returns the resolved absolute path.

func RenameSync

func RenameSync(oldPath, newPath string) error

RenameSync renames (moves) a file.

func RmSync

func RmSync(path string, recursive ...bool) error

RmSync removes a file or directory.

func StatSync

func StatSync(path string) (os.FileInfo, error)

StatSync returns file info.

func UnlinkSync

func UnlinkSync(path string) error

UnlinkSync removes a file.

func WriteFileSync

func WriteFileSync(path string, data string, mode ...os.FileMode) error

WriteFileSync writes data to 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