Download the PHP package webfiori/file without Composer

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

WebFiori File

A PHP library for file operations, providing an object-oriented abstraction layer for reading, writing, uploading, and serving files with streaming support, Base64 encoding/decoding, MIME type detection, and chunked file processing.

PHP 8.1+

Table of Contents

Supported PHP Versions

Build Status

Key Features

Why This Library?

Installation

Requirements:

Quick Start

Core Classes

Using FileInterface

Type-hint FileInterface when your code only needs I/O operations. Use the concrete File class when you need encoding, serialization, or HTTP features.

Mocking in Tests

Examples

The examples/ directory contains runnable PHP scripts covering every feature of the library:

Example Description
Reading and Writing Files Create, write, read, append, and remove files
File Information File metadata: name, extension, MIME, size, timestamps, constructor variants
Partial Read Read specific byte ranges from a file
Appending Data Build up in-memory content with append()
Base64 Encoding Encode/decode Base64, writeEncoded(), readDecoded()
Chunked Processing Split file data into fixed-size chunks
Bytes and Hex Convert data to byte arrays and hex strings
MIME Detection Look up MIME types by extension
Error Handling FileException scenarios and how to handle them
JSON Serialization Convert File objects to JSON
Path Utilities Path normalization, directory creation, file existence checks
File Upload Configure and process uploads with FileUploader
Serving Files Serve files over HTTP with ResponseEmitter
Streaming I/O Read chunks, lines, and ranges with FileStream
Copy and Move Copy and move files with streaming
Atomic Write Crash-safe writes with temp + rename
Streaming Upload Receive large files from php://input
Upload Callbacks Before/after hooks for validation and logging
Resumable Upload Chunked upload with pause/resume support
Custom FileInterface Implement FileInterface for DI, mocking, or custom storage
Custom Emitter Implement ResponseEmitter for framework integration

Each example has its own README with detailed explanations. Run any example with:

Testing

Contributing

  1. Fork the repository and create a feature branch
  2. Write tests for new functionality
  3. Follow PSR-12 coding standards
  4. Submit a pull request

License

MIT — see LICENSE for details.

Support

Found a bug or have a feature request? Open an issue.

Changelog

See CHANGELOG.md for release history.


All versions of file with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
webfiori/jsonx Version 5.0.x
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 webfiori/file contains the following files

Loading the files please wait ...