fs functions #44

Merged
defunkt merged 1 commits from fs into main 2025-11-10 04:06:57 +00:00
Owner

Adds fs functions to the prelude:

  • ls [path] - List directory contents
  • mkdir [path] - Create directory (recursive)
  • rmdir [path] - Remove directory (recursive)
  • pwd [] - Get current working directory
  • cd [path] - Change current working directory
  • read [path] - Read file as UTF-8 string
  • cat [path] - Read file as UTF-8 string (alias for read)
  • read-bytes [path] - Read file as byte array
  • write [path content] - Write content to file
  • append [path content] - Append content to file
  • delete [path] - Delete file or directory
  • rm [path] - Delete file or directory (alias for delete)
  • copy [from to] - Copy file
  • cp [from to] - Copy file (alias for copy)
  • move [from to] - Move/rename file
  • mv [from to] - Move/rename file (alias for move)
  • basename [path] - Get filename from path
  • dirname [path] - Get directory from path
  • extname [path] - Get file extension
  • join [...paths] - Join path segments
  • resolve [...paths] - Resolve path to absolute
  • stat [path] - Get file statistics (size, times, etc.)
  • exists? [path] - Check if path exists
  • file? [path] - Check if path is a file
  • dir? [path] - Check if path is a directory
  • symlink? [path] - Check if path is a symbolic link
  • exec? [path] - Check if file is executable
  • size [path] - Get file size in bytes
  • chmod [path mode] - Change file permissions (mode can be number or octal string)
  • symlink [target path] - Create symbolic link
  • readlink [path] - Read symbolic link target
  • glob [pattern] - Match files by pattern (supports * wildcard)
  • watch [path callback] - Watch file/directory for changes
Adds `fs` functions to the prelude: - ls [path] - List directory contents - mkdir [path] - Create directory (recursive) - rmdir [path] - Remove directory (recursive) - pwd [] - Get current working directory - cd [path] - Change current working directory - read [path] - Read file as UTF-8 string - cat [path] - Read file as UTF-8 string (alias for read) - read-bytes [path] - Read file as byte array - write [path content] - Write content to file - append [path content] - Append content to file - delete [path] - Delete file or directory - rm [path] - Delete file or directory (alias for delete) - copy [from to] - Copy file - cp [from to] - Copy file (alias for copy) - move [from to] - Move/rename file - mv [from to] - Move/rename file (alias for move) - basename [path] - Get filename from path - dirname [path] - Get directory from path - extname [path] - Get file extension - join [...paths] - Join path segments - resolve [...paths] - Resolve path to absolute - stat [path] - Get file statistics (size, times, etc.) - exists? [path] - Check if path exists - file? [path] - Check if path is a file - dir? [path] - Check if path is a directory - symlink? [path] - Check if path is a symbolic link - exec? [path] - Check if file is executable - size [path] - Get file size in bytes - chmod [path mode] - Change file permissions (mode can be number or octal string) - symlink [target path] - Create symbolic link - readlink [path] - Read symbolic link target - glob [pattern] - Match files by pattern (supports * wildcard) - watch [path callback] - Watch file/directory for changes
defunkt added 1 commit 2025-11-10 01:56:22 +00:00
defunkt merged commit 8008f37f16 into main 2025-11-10 04:06:57 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: probablycorey/shrimp#44
No description provided.