Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milan-miscevic/folder
Folder scanner
https://github.com/milan-miscevic/folder
absolute-path active-folder files folder folders relative-path scanner
Last synced: 12 days ago
JSON representation
Folder scanner
- Host: GitHub
- URL: https://github.com/milan-miscevic/folder
- Owner: milan-miscevic
- License: mit
- Created: 2018-01-03T19:31:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T06:42:18.000Z (almost 2 years ago)
- Last Synced: 2024-04-17T08:15:12.023Z (8 months ago)
- Topics: absolute-path, active-folder, files, folder, folders, relative-path, scanner
- Language: PHP
- Homepage:
- Size: 118 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# folder
[![Software License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
[![PDS Skeleton](https://img.shields.io/badge/pds-skeleton-blue.svg?style=flat-square)](https://github.com/php-pds/skeleton)[![GitHub Build](https://github.com/milan-miscevic/folder/workflows/Test/badge.svg?branch=master)](https://github.com/milan-miscevic/folder/actions)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=milan-miscevic_folder&metric=alert_status)](https://sonarcloud.io/dashboard?id=milan-miscevic_folder)
[![Type Coverage](https://shepherd.dev/github/milan-miscevic/folder/coverage.svg)](https://shepherd.dev/github/milan-miscevic/folder)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmilan-miscevic%2Ffolder%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/milan-miscevic/folder/master)A folder scanner.
## Usage
```php
use Mmm\Folder\ActiveFolder;
use Mmm\Folder\ActiveSubFolder;$af = new ActiveFolder(__DIR__);
$af->getFolders(); // returns a list of folders
$af->getAbsoluteFolders(); // returns a list of folders with absolute paths
$af->getFiles(); // returns a list of files
$af->getAbsoluteFiles(); // returns a list of files with absolute paths$asf = new ActiveSubFolder(__DIR__, '.');
$asf->getFolders();
$asf->getAbsoluteFolders();
$asf->getRelativeFolders(); // returns a list of folders with relative paths to the base folder
$asf->getFiles();
$asf->getAbsoluteFiles();
$asf->getRelativeFiles(); // returns a list of files with relative paths to the base folder
```