Skip to content

Add file I/O to standard library #14

@dev-dami

Description

@dev-dami

Description

Need file system operations in the standard library.

Suggested Functions

  • readFile(path) - Read file contents as string
  • writeFile(path, content) - Write string to file
  • appendFile(path, content) - Append to file
  • fileExists(path) - Check if file exists
  • deleteFile(path) - Delete a file
  • listDir(path) - List directory contents

Considerations

  • Return Result types for error handling: readFile("foo.txt")?
  • Security: sandboxing? path validation?

Where to Start

  • pkg/eval/builtins.go - Add builtin implementations
  • Use Go's os and io/ioutil packages

Priority

High - needed for package manager and self-hosting.

Metadata

Metadata

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions