Download the PHP package effectra/fs without Composer

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

Effectra FS - File Class

Effectra FS is a PHP library that offers a comprehensive set of classes for managing various aspects of the file system, including files, folders, JSON, CSV, and XML. The File class provided by Effectra FS provides static methods for handling file-related operations.

Installation

This command will download and install the Effectra FS library along with its dependencies into your project.

After the installation is complete, you can start using the library by including the necessary files and utilizing the File class as demonstrated in the previous readme file.

Class Reference

File Class

The File class provides static methods for managing files and performing file system operations.

Methods

Usage

Once you have installed the Effectra FS library using Composer, you can start using the File class in your PHP code. Here's an example of how you can utilize some of the methods provided by the File class:

In this example, we demonstrate the usage of methods such as exists(), put(), getContent(), and delete() from the File class. You can explore the various methods available in the class and use them according to your file system requirements.

Make sure to adjust the file paths according to your specific use case.

Remember to include the Composer-generated autoloader (require_once 'vendor/autoload.php';) at the beginning of your PHP script to ensure that the Effectra FS library is properly loaded.

Effectra FS - Directory Class

Utility class for working with directories.

Methods

Example Usage

`

Note: Please make sure to replace /path/to with the actual path in your code.

Effectra FS - Path Class

Effectra\Fs\Path is a utility class for manipulating file paths in PHP.

Usage

The Path class provides several useful methods for manipulating file paths:

ds(): string

Retrieves the directory separator for the current platform.

Example:

format(string $path): string

Formats a given path by replacing forward slashes, backslashes, and multiple separators with the directory separator.

Example:

removeExtension(string $path): string

Removes the extension from a given path.

Example:

setExtension(string $path, string $ext): string

Sets the extension of a given path.

Example:

Effectra FS - FileData Class

Effectra\Fs\FileData is a utility class for converting files to data URLs and vice versa in PHP.

Usage

The FileData class provides two methods for converting files to data URLs and vice versa:

fileToDataUrl(string $file): string|false

Converts a file to a data URL.

Example:

dataUrlToFile(string $dataUrl, string $file): bool

Converts a data URL to a file.

Example:

FileEncryption Class (Version >= 1.1)

The FileEncryption class provides utility methods for encrypting and decrypting files.

Usage

Make sure to replace 'your-encryption-key' with your own encryption key.

Example

In the above example, the FileEncryption class is used to encrypt the content of the data.txt file and store the encrypted data in the encrypted-data.txt file. It also provides a method to decrypt the encrypted data and save it in a separate file.

Encryption Algorithm

The FileEncryption class uses the AES-256-CBC encryption algorithm with a randomly generated initialization vector (IV) for each encryption operation.

Note: Make sure to keep the encryption key secure and do not share it with unauthorized individuals.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.

License

This package is open-source software licensed under the MIT license.


All versions of fs with dependencies

PHP Build Version
Package Version
No informations.
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 effectra/fs contains the following files

Loading the files please wait ....