System library of the Ride framework

1.1.2 2020-11-09 09:18 UTC

This package is auto-updated.

Last update: 2020-11-09 09:18:29 UTC


System abstraction library of the PHP Ride framework.

What's In This Library


The System class in an abstraction of the underlying server system. It offers easy access to the underlying file system. You can also use it to execute commands or check the type of system, the connected client, ...


The FileSystem interface is an abstraction of the underlying file system. A Windows file system is handled different then a Unix file system. This interface makes it possible to program transparantly for both systems.


The file system works with File objects. All file operations are to be called through this class.


The FileBrowser interface is to create a transparant file structure. You can use it to request relative files without knowing how your files are organized. On top of that, you can request the application and the public directory.


You can use the PermissionConverter to convert permissions to different formats.

Code Sample

Check this code sample to see the possibilities of this library:


use ride\library\system\System;

$system = new System();

// check the type of operating system

// check the client
$system->getClient(); // ip address or username when in cli

// execute a command
$output = $system->execute('whoami');

// file system abstraction
$fileSystem = $system->getFileSystem();

$dir = $fileSystem->getFile('/path/to/dir');
$files = $dir->read();

$file = $fileSystem->getFile('/path/to/file');
$content = $file->read();

$destination = $dir->getChild($file->getName());
$destination = $destination->getCopyFile();



For more examples, you can check the following implementation of this library:


You can use Composer to install this library.

composer require ride/lib-system