2017 © Pedro Peláez
 

library filesystem

Filesystem component contains methods that assist in working with files and directories.

image

flextype-components/filesystem

Filesystem component contains methods that assist in working with files and directories.

  • Monday, April 23, 2018
  • by Awilum
  • Repository
  • 1 Watchers
  • 3 Stars
  • 99 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 52 % Grown

The README.md

Filesystem Component

versionMIT License, (*1)

Filesystem component contains methods that assist in working with files and directories., (*2)

Installation

composer require flextype-components/filesystem

Usage

use Flextype\Component\Filesystem\Filesystem;

Returns true if the File exists., (*3)

if (Filesystem::fileExists('filename.txt')) {
  // Do something...
}

Delete file, (*4)

Filesystem::deleteFile('filename.txt');

Rename file, (*5)

Filesystem::renameFile('filename1.txt', 'filename2.txt');

Copy file, (*6)

Filesystem::copyFile('folder1/filename.txt', 'folder2/filename.txt');

Get the File extension., (*7)

echo Filesystem::fileExt('filename.txt');

Get the File name, (*8)

echo Filesystem::filename('filename.txt');

Get list of files in directory recursive, (*9)

$files = Filesystem::getFilesList('folder');
$files = Filesystem::getFilesList('folder', 'txt');
$files = Filesystem::getFilesList('folder', array('txt', 'log'));

Fetch the content from a file or URL., (*10)

echo Filesystem::getFileContent('filename.txt');

Writes a string to a file., (*11)

Filesystem::setFileContent('filename.txt', 'Content ...');

Get time(in Unix timestamp) the file was last changed, (*12)

echo Filesystem::getFileLastChange('filename.txt');

Get last access time, (*13)

echo Filesystem::getFileLastAccess('filename.txt');

Returns the mime type of a file., (*14)

echo Filesystem::getFileMimeType('filename.txt');

Forces a file to be downloaded., (*15)

Filesystem::downloadFile('filename.txt');

Display a file in the browser., (*16)

Filesystem::displayFile('filename.txt');

Tests whether a file is writable for anyone., (*17)

if (Filesystem::isFileWritable('filename.txt')) {
  // do something...
}

Creates a directory, (*18)

Filesystem::createDir('folder1');

Checks if this directory exists., (*19)

if (Filesystem::dirExists('folder1')) {
  // Do something...
}

Check dir permission, (*20)

echo Filesystem::checkDirPerm('folder1');

Delete directory, (*21)

Filesystem::deleteDir('folder1');

Get list of directories, (*22)

$dirs = Filesystem::getDirList('folders');

Check if a directory is writable., (*23)

if (Filesystem::isDirWritable('folder1')) {
  // Do something...
}

Get directory size., (*24)

echo Filesystem::getDirSize('folder1');

License

See LICENSE, (*25)

The Versions

23/04 2018

dev-master

9999999-dev https://github.com/flextype-components/filesystem

Filesystem component contains methods that assist in working with files and directories.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

file filesystem dir

23/04 2018

v1.1.1

1.1.1.0 https://github.com/flextype-components/filesystem

Filesystem component contains methods that assist in working with files and directories.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

file filesystem dir

12/04 2018

v1.1.0

1.1.0.0 https://github.com/flextype-components/filesystem

Filesystem component contains methods that assist in working with files and directories.

  Sources   Download

MIT

The Requires

  • php ^7.1.3

 

file filesystem dir

03/11 2015

v1.0.3

1.0.3.0 https://github.com/force-components/FileSystem/issues

File and Dir class contains methods that assist in working with files and directories.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

file filesystem dir force

27/10 2015

v1.0.2

1.0.2.0 https://github.com/force-components/FileSystem/issues

File and Dir class contains methods that assist in working with files and directories.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

file filesystem dir force