Download the PHP package spoova/filemanager without Composer

On this page you can find all versions of the php package spoova/filemanager. 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 filemanager

FileManager

The Filemanager class has some useful features which allows the reading and writing into editable files, transferring of files and zipping of files or directories.

Initializing class

This class can be initialized as shown below

Create new directory

A new directory can only be created by supplying the full path of the new directory with the method. This method does not also update the last directory defined within the class. It only adds a new directory if it does not exist and returns true if the directory has been created or it already exists.

Setting url for activity

Aside from few methods like and methods which have stand-alone capabilities of overiding default urls, when using Filemanger for activities, a url or file path is expected to be defined which helps the Filemanager class to know where the operation is expected to be performed. A directory or file path can be specified with the method. An example is shown below:

Create a new file

To create a new file, we can use the method. This method will only create a file if the file does not exist. A boolean of true will be returned if the file created is readable.

Create multiple files

To create multiple files, we can use the method. The first argument is an array list of full file paths of files expected to be created. The method will create directories for files if the directories do not exist and it only fails when an error is encountered and a file cannot be created. It returns true if all files were created successfully.

Working with files and directories

In order to work with a directory, the directory must be defined where an activity is expected to be performed using the method. Once the source url is defined, we can proceed with the activity.

Set a url
Get folders in specified directory

Folder names only can be harvested without their full paths

Get files in specifed directory

File names and extension can be harvested without their full paths as shown below

We can also get names of files without their extensions. However, it is important to always get extension names to know the type of file

Get contents of a directory
Zip a directory

To zip a url, the methods can be applied with the syntax below

Extract from a zip file

To extract a non-protected zipped file to a directory, the method can be applied.

Working with text readable files

Reading from files is usually done by specifying a key and a separator character. By default, Filemanager uses the colon character to differentiate between keys and values. In some cases the default character is set as as in the case of method. We can read from a readable file by using the and method.

Reading from text file

Fetching errors

The method returns the last error detected if an error occurs within the Filemanager system. However, when working with zip files, the and succeeds() method can help to detect the error that occurs in the process of zipping or decompressing a file. Example of usage is shown below


$Filemanager->setUrl('some/dir'); 

$Filemanager->zipUrl(); 

if($Filemanager->succeeds()) {

     echo 'Zipping successful';

}elseif($Filemanager->fails()) {

     echo $Filemanager->error();  

} else {

     echo 'Something is wrong!';

}

All versions of filemanager with dependencies

PHP Build Version
Package Version
Requires spoova/enlist Version ^1
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 spoova/filemanager contains the following files

Loading the files please wait ....