Download the PHP package dcarbone/directory-iterator-plus without Composer

On this page you can find all versions of the php package dcarbone/directory-iterator-plus. 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 directory-iterator-plus

directory-iterator-plus

A simple extension of the PHP \DirectoryIterator class

Build Status: Build Status

Installation in your Composer App

Concept

I had a need to be able to, relatively quickly, create a web interface which allowed the navigation of a directory of thousands of files.

I did not want to glob() my way through them, and I wanted a simple way to paginate and search through them.

This class met that need.

Usage

This class is an extension of the base PHP class DirectoryIterator and as such has all the same methods available, and to a great extent it's functionality is unchanged.

New Methods

I have provided several custom methods, most of which revolve around either getting a subset of files or determining the existence of a file within a directory

File and Directory Counting

You may retrieve these values after instantiation by calling getFileCount() or getDirectoryCount() methods.

I used to do some exec nonsense, but now I just be lazy and use glob.

Searching

There are several options available to you:

Each of the "Like" methods utilize PHP's stripos function to determine if the passed value is contained wholly somewhere inside of the filename of a given file / directory.

File Pagination

There are currently two Pagination methods available:

These methods are designed to operate similar to any other pagination code used against a database.

The $search term again uses the PHP stripos method to determine matches.

The primary difference between these two methods is the contents of the returned array.

paginateFileNames()

This method will return an array of file names that match the input criteria

paginateFiles()

This method will return an array of \DCarbone\DirectoryIteratorPlus objects, each representing an individual file.

Comments and Suggestions

If you find this library useful and have an idea of how it can be made better, please let me know!


All versions of directory-iterator-plus with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
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 dcarbone/directory-iterator-plus contains the following files

Loading the files please wait ....