此包最新版本(1.0.0)没有可用的许可证信息。

PHP 的 io 库

1.0.0 2014-09-09 14:25 UTC

This package is not auto-updated.

Last update: 2024-09-24 02:27:50 UTC


README

Latest Stable Version Total Downloads Build Status

PHP IO

PHP IO 是一个用于处理目录和文件夹的小型库。

用法

<?php

use Philasearch\IO\Directory as Directory;
use Philasearch\IO\File      as File;

$dir = new Directory( '/path/to/directory' );

$files = $dir->getFiles(); // returns an array of files

foreach ( $files as $file )
{
    $file->readFile();  // returns the file contents as a string
    $file->getPath();   // returns the file path
    $file->getName();   // returns the file name
}