Download the PHP package molajo/filesystem without Composer

On this page you can find all versions of the php package molajo/filesystem. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filesystem

======= Filesystem

Build Status

Simple, uniform file and directory services API for PHP applications for interacting with different filesystems in a common way.

System Requirements

At a glance ...

This is a quick look at the Filesystem API, more information on each method can be found, below. First, the application connects to a Filesystem. From that point on, reading, writing, listing, copying, moving, etc., files and folders is the same for the application, regardless of the underlying system. With the exception of the read method, each are designed to provide results for either a file or a folder. Since Exceptions can be thrown, it is recommended methods be used within Try/Catch blocks.

Filesystem Adapter Interface

What is Filesystem?

Filesystem provides a common API for File and Folder operations, including: exists, getMetadata, read, getList, write, delete, copy, move, and rename on, and between, filesystems. In addition, applications can perform basic system administrative tasks like changing the owner, group, permissions, lasted updated, and touch dates for files and folders.

Class Instantiation

After instantiating the adapter class for a specific filesystem, the application can then interact with that filesystem.

The local filesystem is default and does require any input. Other filesystems require specific types of input, as described in the Filesystem Handlers section, below.

Using the Filesystem Adapter

Applications can use $adapter to interact with files and folders as in this example of reading a file.

Filesystem API

Listed are the various methods available, an example, parameters definitions and how to access the results. It is recommended to use each method in a Try/Catch block since the method could throw an exception.

Exists

Verifies if the file or folder defined by $path exists, returns true or false.

Parameters

getMetadata

Retrieves an object containing metadata for the file or folder defined in $path:

Parameters

Metadata

The metadata available for each type of Filesystem can vary. For the Local Filesystem, this is the list of metadata available.

Metadata about the Filesystem handler, root, persistence, default_directory_permissions, default_file_permissions and read_only.

Metadata about requested path (be it a file or folder) path, is_absolute, absolute_path, exists, owner, group, create_date, access_date, modified_date, is_readable, is_writable, is_executable, is_directory, is_file, is_link, type, name, parent, extension, file_name_without_extension, size and mime_type.

Read

To read a specific file from a filesystem:

Parameters

Get List

Returns an array of files and folders for a given path, optionally recursively processing all sub-folders, and optionally limiting the results to those file extensions identified.

Parameters

Write

Writes data to the file identified in the given path, optionally replacing existing data, appending to the data that already exists, or truncating the data in the file, but leaving the empty file in place.

Parameters

Delete

Deletes the folder and/or files identified in the given path, recursively deleting subfolders and files if so specified.

Parameters

Copy

Copies the file(s) and folder(s) from a filesystem to a location on the same or a different filesystem.

When copying a single file, a new filename can be specified using the target_name field.

Parameters

Move

Moves the file(s) and folder(s) from a filesystem to a location on the same or a different filesystem.

When moving a single file, a new filename can be specified using the target_name field.

Parameters

Rename

Renames the file or folder to the specified value.

Parameters

Change Owner

Change owner for file or folder identified in path, recursively changing the owner for all subordinate files and folders, if specified

Parameters

Change Group

Change group for file or folder identified in path, recursively changing the group for all subordinate files and folders, if specified

Parameters

Change Permission

Change permission for file or folder identified in path, recursively changing the permission for all subordinate files and folders, if specified

Parameters

Touch

Update the modification time and access time for the directory or file identified in $path.

Parameters

Filesystem Handlers

To use a filesystem, the application instantiates the Connection class, passing in a request for a specific filesystem adapter handler. Different types of filesystems require different input to access the environment. For example, some systems require username and password authentication. Startup properties are passed into the filesystem adapter handler using the $options array.

Local Filesystem Handler

FTP Filesystem Handler

This shows how to backup a file on one filesystem to another filesystem.

Parameters

Media Filesystem Handler

Creative Uses of Filesystem

Merged Filesystems

You can use Filesystem to easily create a merged filesystem: Just instantiate multiple classes and merge read results.

Backup

Filesystem supports copying files and folders to another filesystem. Combining this capability with an application cron job is a good way to schedule backups.

Archive

Filesystem supports moving files and folders to another filesystem, simplifying the process of content archival.

Upload and Download

Install using Composer from Packagist

Step 1: Install composer in your project

Step 2: Create a composer.json file in your project root

Step 3: Install via composer

About

Molajo Project has adopted the following:

Submitting pull requests and features

Pull requests GitHub

Features GitHub

Author

Amy Stephen - http://twitter.com/AmyStephen
See also the list of contributors participating in this project.

License

Molajo Filesystem is licensed under the MIT License - see the LICENSE file for details

Acknowledgements

W3C File API: Directories and System W3C Working Draft 17 April 2012 → specifications were followed, as closely as possible.

More Information


All versions of filesystem with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
commonapi/filesystem Version dev-master
commonapi/exception Version dev-master
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package molajo/filesystem contains the following files

Loading the files please wait ....