ionitium / filesystem
Ionitium Filesystem
1.1.1
2018-01-28 12:05 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: 4.5.*
This package is not auto-updated.
Last update: 2024-11-09 20:12:19 UTC
README
The Filesystem
provides manage, access and retrieve information of file
Installation
Prerequisities
PHP version requirements: PHP >5.3
PHP package requiremenets: php-xml or specified version (php5.6-xml, php7.0-xml, php7.1-xml)
Add use Ionitium\Filesystem\Filesystem
declaration into required vendor package.
Example use to create directory:
use Ionitium\Filesystem\Filesystem; $filesystem = new Filesystem; if ($filesystem->mkdir('/tmp/myfolder')) { echo 'Directory created'; }
Changelog
Status of core:
PHP version above 5.3
.
Quality assurance: Unit tests provided
Table of Contents
See TOC in docs
directory
Filesystem
mkdir()
- Create a directorytouch()
- Create a file or set access timetouchWithoutOwnerSet()
- Change a file state changed by ownertouchAlternate()
- Touch a file using fopenremove()
- Remove a file or folder from pathcopy()
- Copy recursive file and folderisExists()
- Check if file or directory existsisExistsAnyFile()
- Check if any file exists in folder recursive or get lists of filesgetFiles()
- Get files inside directory non-recursive or recursivesetChmod()
- Changes file modesetChmodRecursive()
- Changes file mode separated by file chmod and directory chmodsetChgrp()
- Changes file groupsetChown()
- Change file ownerrename()
- Rename a file or foldergetFileOwner()
- Return info about a user by user idgetFileOwnerName()
- Return info about a user by user idgetLastAccessTime()
- Get last access time of filereadFile()
- Read a filewriteFilePrepend()
- Prepend a data to a filewriteFileAppend()
- Append a data to a filewriteFile()
- Write a new file, overwrite if existscreateFileAndClose()
- Create a non-exists file then closeisWriteable()
- Tells whether the filename is writablegetGuid()
- Generate 128 bits of random dataemptyFile()
- Truncate a fileisSymbolicLink()
- Tells whether the filename is a symbolic linkuploadFile()
- Moves an uploaded file to a new locationcreateHardLink()
- Create a hard linkcreateSymbolicLink()
- Creates a symbolic linkgetLinkTarget()
- Returns the target of a symbolic linkcreateFileAutoUnique()
- Create file with unique file namecreateTemporaryFile()
- Creates a temporary filereadTemporaryFile()
- Read a data from create temporary fileremoveTemporaryFile()
- Close temporary filegetLinkInfo()
- Gets information about a linkexecuteFileInBackground()
- Execute background processgetProcessSnapshot()
- Get a processgetTreeStructure()
- Get tree structure of filegetHexDump()
- Returns hexadecimal dumps from a filegetHexDump()
- Get checksum of filegetIncludedFiles()
- Get a lists of included filesgetBasename()
- Get basename of the pathreadFileSeek()
- Returns string from read file at specified line
FilesystemInfo
getStatRaw()
- Gives information about a filegetLastAccess()
- Gets last access time of filegetLastModification()
- Gets last modification time of filegetLastChanged()
- Gets inode change time of file, marks of last timegetFileInode()
- Gets file inodegetFileOwner()
- Gets file ownergetFilePermission()
- Gets file permissionsgetFileSize()
- Get file sizegetFileType()
- Gets file typegetHumanFileSize()
- Get human readable filesizegetFileGroup()
- Gets file groupgetCountLines()
- Counts number lines of codegetDiskFreeSpace()
- Returns available space on filesystem or disk partitiongetDiskTotalSpace()
- Returns the total size of a filesystem or disk partitiongetDiskTotalUsage()
- Returns the total usage of disk filesystemgetPathInfo()
- Returns information about a file pathgetMime()
- Return the mime type and encodinggetMimeType()
- Return the mime typegetMimeEncoding()
- Return the mime encodinggetMimeContentType()
- Detect MIME Content-type for a filegetInfoNone()
- Returns mime info globalgetInfoDevices()
- Return information about a filegetInfoRaw()
- Returns raw information of file