Documentation

FileSystem
in package

AbstractYes

Table of Contents

Constants

ARCHIVE_MAX_FILES  = 1000
FFMPEG_PATH  = 'C:/NetzwerkDaten/Dropbox/Tools/ffmpeg/ffmpeg.exe'
SCANDIR_EXCLUDE_DIRS  = 1
SCANDIR_EXCLUDE_FILES  = 2
SCANDIR_EXCLUDE_HIDDEN  = 16
SCANDIR_FILEINFO  = 64
SCANDIR_REALPATH  = 4
SCANDIR_SORT  = 32
SCANDIR_WEBPATH  = 8
ZIP_PATH  = 'C:/Program Files/7-Zip/7z.exe'
ZIP_QUERY_CREATE  = 'a -t7z "%1$s" "%2$s" -mx0 -ms=off -mmt -y'
ZIP_QUERY_EXTRACT  = 'e "%1$s" -y -o"%2$s"'
ZIP_QUERY_UPDATE  = 'u -t7z "%1$s" "%2$s" -mx0 -ms=off -mmt -y'

Properties

$audioExtensions  : array<string|int, mixed>
$sizeUnits  : array<string|int, mixed>
$subttitleExtensions  : array<string|int, mixed>
$videoExtensions  : array<string|int, mixed>

Methods

archivePath()  : mixed
asNode()  : DOMNode|null
base64Decode()  : string
Decodes a name created by base64Encode.
base64Encode()  : string
Creates a filesystem-compatible name using base64.
changetime()  : int|null
commandExists()  : bool
Determines whether or not a command is available on the command line.
copy()  : void
Copies files and directories.
dirModifyTime()  : mixed
download()  : mixed
downloadByURI()  : mixed
drawBytes()  : string
ensureDirectory()  : void
extension()  : string
extractArchive()  : mixed
filenameEncode()  : string
filenameSanitize()  : string
free()  : float|null
generateStorageKey()  : string
getLinkByXPath()  : mixed
getStorage()  : IEphemeralStorage
isAudio()  : bool
isSubttitle()  : bool
isVideo()  : bool
loadCSV()  : array<string|int, mixed>|null
lookupFile()  : mixed
maketime()  : int|null
mediaInfo()  : array<string|int, mixed>
mime()  : string|null
outputChunk()  : mixed
removeDir()  : void
Deletes the contents of a directory.
scanDir()  : array<string|int, mixed>
List the contents of a directory.
setStorage()  : mixed
size()  : int|null
webpath()  : string

Constants

ARCHIVE_MAX_FILES

public mixed ARCHIVE_MAX_FILES = 1000

FFMPEG_PATH

public mixed FFMPEG_PATH = 'C:/NetzwerkDaten/Dropbox/Tools/ffmpeg/ffmpeg.exe'

SCANDIR_EXCLUDE_DIRS

public mixed SCANDIR_EXCLUDE_DIRS = 1

SCANDIR_EXCLUDE_FILES

public mixed SCANDIR_EXCLUDE_FILES = 2

SCANDIR_EXCLUDE_HIDDEN

public mixed SCANDIR_EXCLUDE_HIDDEN = 16

SCANDIR_FILEINFO

public mixed SCANDIR_FILEINFO = 64

SCANDIR_REALPATH

public mixed SCANDIR_REALPATH = 4

SCANDIR_WEBPATH

public mixed SCANDIR_WEBPATH = 8

ZIP_PATH

public mixed ZIP_PATH = 'C:/Program Files/7-Zip/7z.exe'

ZIP_QUERY_CREATE

public mixed ZIP_QUERY_CREATE = 'a -t7z "%1$s" "%2$s" -mx0 -ms=off -mmt -y'

ZIP_QUERY_EXTRACT

public mixed ZIP_QUERY_EXTRACT = 'e "%1$s" -y -o"%2$s"'

ZIP_QUERY_UPDATE

public mixed ZIP_QUERY_UPDATE = 'u -t7z "%1$s" "%2$s" -mx0 -ms=off -mmt -y'

Properties

$audioExtensions

public static array<string|int, mixed> $audioExtensions = ['mp3', 'wav', 'ogg', 'wma', 'ogm', 'mid', 'm4a']

$sizeUnits

public static array<string|int, mixed> $sizeUnits = ['B', 'kB', 'MB', 'GB', 'TB']

$subttitleExtensions

public static array<string|int, mixed> $subttitleExtensions = ['vtt', 'srt', 'ssa', 'ass']

$videoExtensions

public static array<string|int, mixed> $videoExtensions = ['avi', 'mkv', 'mp4', 'mov', 'ogv', 'wmv', 'mpg', 'webm', 'm4v', 'flv', 'ogm']

Methods

archivePath()

public static archivePath(mixed $directoryPath, mixed $archiveName[, mixed $checkUpdate = false ]) : mixed
Parameters
$directoryPath : mixed
$archiveName : mixed
$checkUpdate : mixed = false

asNode()

public static asNode(string $path[, DOMDocument $dataDoc = null ]) : DOMNode|null
Parameters
$path : string
$dataDoc : DOMDocument = null
Return values
DOMNode|null

base64Decode()

Decodes a name created by base64Encode.

public static base64Decode(string $fileName) : string
Parameters
$fileName : string
Return values
string

base64Encode()

Creates a filesystem-compatible name using base64.

public static base64Encode(string $fileName) : string
Parameters
$fileName : string
Return values
string

changetime()

public static changetime(string $fileName) : int|null
Parameters
$fileName : string
Return values
int|null

commandExists()

Determines whether or not a command is available on the command line.

public static commandExists(string $command) : bool
Parameters
$command : string
Return values
bool

copy()

Copies files and directories.

public static copy(string $from, string $to) : void
Parameters
$from : string
$to : string

dirModifyTime()

public static dirModifyTime(string $dirPath[, string|null $rootPath = null ]) : mixed
Parameters
$dirPath : string
$rootPath : string|null = null

download()

public static download(mixed $filePath, mixed $downloadName) : mixed
Parameters
$filePath : mixed
$downloadName : mixed

downloadByURI()

public static downloadByURI(mixed $destPath, mixed $sourceURI[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$destPath : mixed
$sourceURI : mixed
$options : array<string|int, mixed> = []

drawBytes()

public static drawBytes(mixed $size[, int $precision = 2 ]) : string
Parameters
$size : mixed
$precision : int = 2
Return values
string

ensureDirectory()

public static ensureDirectory(string $directory) : void
Parameters
$directory : string

extension()

public static extension(string $fileName) : string
Parameters
$fileName : string
Return values
string

extractArchive()

public static extractArchive(mixed $archivePath, mixed $targetDirectory) : mixed
Parameters
$archivePath : mixed
$targetDirectory : mixed

filenameEncode()

public static filenameEncode(string $filename[, bool $removeRoot = false ]) : string
Parameters
$filename : string
$removeRoot : bool = false
Return values
string

filenameSanitize()

public static filenameSanitize(string $filename) : string
Parameters
$filename : string
Return values
string

free()

public static free(string $fileName) : float|null
Parameters
$fileName : string
Return values
float|null

generateStorageKey()

public static generateStorageKey(string $path[, string $hash = '' ]) : string
Parameters
$path : string
$hash : string = ''
Return values
string

getLinkByXPath()

public static getLinkByXPath(mixed $sourceURI, mixed $linkQuery) : mixed
Parameters
$sourceURI : mixed
$linkQuery : mixed

isAudio()

public static isAudio(string $fileName) : bool
Parameters
$fileName : string
Return values
bool

isSubttitle()

public static isSubttitle(string $fileName) : bool
Parameters
$fileName : string
Return values
bool

isVideo()

public static isVideo(string $fileName) : bool
Parameters
$fileName : string
Return values
bool

loadCSV()

public static loadCSV(string $path[, string $delimiter = ',' ][, string $enclosure = '"' ][, string $escape = '\' ]) : array<string|int, mixed>|null
Parameters
$path : string
$delimiter : string = ','
$enclosure : string = '"'
$escape : string = '\'
Return values
array<string|int, mixed>|null

lookupFile()

public static lookupFile(string $fileName) : mixed
Parameters
$fileName : string

maketime()

public static maketime(string $fileName) : int|null
Parameters
$fileName : string
Return values
int|null

mediaInfo()

public static mediaInfo(string $filePath) : array<string|int, mixed>
Parameters
$filePath : string
Return values
array<string|int, mixed>

mime()

public static mime(string $fileName) : string|null
Parameters
$fileName : string
Return values
string|null

outputChunk()

public static outputChunk(mixed $filePath, mixed $start, mixed $length) : mixed
Parameters
$filePath : mixed
$start : mixed
$length : mixed

removeDir()

Deletes the contents of a directory.

public static removeDir(string $path[, bool $keepRoot = false ]) : void
Parameters
$path : string
$keepRoot : bool = false

scanDir()

List the contents of a directory.

public static scanDir(string $relPath[, int $options = 0 ][, string $filter = null ]) : array<string|int, mixed>
Parameters
$relPath : string
$options : int = 0
$filter : string = null
Return values
array<string|int, mixed>

size()

public static size(string $fileName) : int|null
Parameters
$fileName : string
Return values
int|null

webpath()

public static webpath(string $fileName[, bool $absolute = true ]) : string
Parameters
$fileName : string
$absolute : bool = true
Return values
string

        
On this page

Search results