Filesystem Abstraction

The rampage\\filesystem component provides an OO abstraction layer for filesystem access.

A filesystem might be a local, remote or even a virtual filesystem.

FilesystemInterface

Interface: rampage\\filesystem\\FilesystemInterface

This interface defines basic filesystem access via the ArrayAccess and RecursiveIterator patterns. It encapsulates the underlying filesystem and provides container like access. Much like Phar or ZipArchive

It is not intended to provide write access.

The following classes are provided as implementation for this interface:

  • LocalFilesystem: For fs access on disk.
  • GridFS: For accessing a MongoDB GridFS.

WritableFilesystemInterface

Interface: rampage\\filesystem\\WritableFilesystemInterface

This interface enhances the FilesystemInterface by defining write capabilities which are:

  • adding files
  • deleting files
  • creating directories
  • updating the access/modified timestamps (touch)

An implementation must provide these methods and respond gracefully, when they’re not supported (i.e. creating directories).

The following classes are provided as implementation for this interface:

Available Implementations