The Filesystem component provides platform-independent utilities for filesystem operations and for file/directory paths manipulation. The component contains two main classes called Filesystem and Path. mkdir() creates a directory recursively. On POSIX filesystems, directories are created with a default mode value 0777. You can use the second argument to set your own mode. exists() checks for the presence of one or more files or directories and returns false if any of them is missing. copy() makes a copy of a single file (use mirror() to copy directories). If the target already exists, the file is copied only if the source modification date is later than the target. This behavior can be overridden by the third boolean argument. touch() sets access and modification time for a file. The current time is used by default. You can set your own with the second argument. The third argument is the access time.

Features

  • Provides platform-independent utilities
  • Utilities for filesystem operations
  • Utilities for file/directory paths manipulation
  • Find longest common base paths
  • Convert absolute/relative paths
  • Find directories/root directories

Project Samples

Project Activity

See All Activity >

Categories

File Systems

License

MIT License

Follow Filesystem Component

Filesystem Component Web Site

You Might Also Like
Gen AI apps are built with MongoDB Atlas Icon
Gen AI apps are built with MongoDB Atlas

The database for AI-powered applications.

MongoDB Atlas is the developer-friendly database used to build, scale, and run gen AI and LLM-powered apps—without needing a separate vector database. Atlas offers built-in vector search, global availability across 115+ regions, and flexible document modeling. Start building AI apps faster, all in one place.
Start Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Filesystem Component!

Additional Project Details

Programming Language

PHP

Related Categories

PHP File Systems

Registered

2022-01-07