Download the PHP package neunerlei/filesystem without Composer

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

File System

This package contains a static wrapper around the symfony file system component with some additional features. Since version 5.3 it also contains an extension for the Path utility, and replaces Neunerlei/path-util.

Installation

Install this package using composer:

Filesystem Utility

The filesystem class can be found at .

getFs()

Returns the singleton instance of the symfony file system class

copy()

Copies a file or a directory. If the target file is older than the origin file, it's always overwritten.

mkdir()

Creates a directory recursively.

exists()

Checks the existence of files or directories.

isReadable()

Tells whether a file or list of files exists and is readable.

isWritable()

Tells whether a file or list of files exists and is writable.

isFile()

Tells whether a file or list of paths exists and contains only files

isDir()

Tells whether a file or list of paths exists and contains only directories

touch()

Sets access and modification time of file.

NOTE: You can also pass DateTime objects as timestamps!

remove()

Removes files or directories.

flushDirectory()

Removes all contents from a given directory without removing the element itself.

getDirectoryIterator()

Helper to create a directory iterator either for a single folder or recursively. Dots will automatically be skipped. It can also find only files matching a regular expression. By default the folder will come after the children, which can be toggled using the options.

rename()

Allows you to rename a file or directory

getPermissions()

Returns the unix file permissions for a given file like "0777" as a string.

setPermissions()

Can be used to set the unix permissions for a file or folder.

getOwner()

Returns the numeric unix user id for the given file or folder

setOwner()

Can be used to update the owner of a given file or folder

getGroup()

Returns the numeric unix user group for the given filename

setGroup()

Can be used to update the group of a given file or folder

readFile()

A wrapper around file_get_contents which reads the contents, but handles unreadable or non existing files with speaking exceptions.

readFileAsLines()

A wrapper around file() which handles non existing, or unreadable files with speaking exceptions.

writeFile()

Writes the given content into a file on your file system.

appendToFile()

Appends content to an existing file. By default all content will be added on a new line.

Path Utility

The filesystem class can be found at .

Running tests

Special Thanks

Special thanks goes to the folks at LABOR.digital (which is the word german for laboratory and not the english "work" :D) for making it possible to publish my code online.

Postcardware

You're free to use this package, but if it makes it to your production environment I highly appreciate you sending me a postcard from your hometown, mentioning which of our package(s) you are using.

You can find my address here.

Thank you :D


All versions of filesystem with dependencies

PHP Build Version
Package Version
Requires symfony/filesystem Version ^5.4|^v6.2.0|^7.2.0
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 neunerlei/filesystem contains the following files

Loading the files please wait ....