FileHandlingUtility implements LoggerAwareInterface uses LoggerAwareTrait

Utility for dealing with files and folders.

Internal

This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.

Table of Contents

Interfaces

LoggerAwareInterface

Methods

__construct()  : mixed
getExtensionDir()  : string
Returns the installation directory for an extension depending on the installation scope
removeDirectory()  : void
Remove specified directory
unpackExtensionFromExtensionDataArray()  : void
Unpack an extension in t3x data format and write files
unzipExtensionFromFile()  : void
Unzip an extension.zip.
addDirectory()  : void
Add specified directory
createDirectoriesForExtensionFiles()  : void
Loops over an array of directories and creates them in the given root path It also creates nested directory structures
extractDirectoriesFromExtensionData()  : array<string|int, mixed>
Extract needed directories from given extensionDataFilesArray
getRelativePath()  : string
makeAndClearExtensionDir()  : string
Removes the current extension of $type and creates the base folder for the new one (which is going to be imported)
reloadPackageInformation()  : void
writeEmConfToFile()  : void
Constructs emConf and writes it to corresponding file
writeExtensionFiles()  : void
Loops over an array of files and writes them to the given rootPath

Methods

getExtensionDir()

Returns the installation directory for an extension depending on the installation scope

public getExtensionDir(string $extensionKey) : string
Parameters
$extensionKey : string
Return values
string

removeDirectory()

Remove specified directory

public removeDirectory(string $extDirPath) : void
Parameters
$extDirPath : string

unpackExtensionFromExtensionDataArray()

Unpack an extension in t3x data format and write files

public unpackExtensionFromExtensionDataArray(string $extensionKey, array<string|int, mixed> $extensionData) : void
Parameters
$extensionKey : string
$extensionData : array<string|int, mixed>

unzipExtensionFromFile()

Unzip an extension.zip.

public unzipExtensionFromFile(string $file, string $fileName) : void
Parameters
$file : string

path to zip file

$fileName : string

file name

addDirectory()

Add specified directory

protected addDirectory(string $extDirPath) : void
Parameters
$extDirPath : string

createDirectoriesForExtensionFiles()

Loops over an array of directories and creates them in the given root path It also creates nested directory structures

protected createDirectoriesForExtensionFiles(array<string|int, mixed> $directories, string $rootPath) : void
Parameters
$directories : array<string|int, mixed>
$rootPath : string

extractDirectoriesFromExtensionData()

Extract needed directories from given extensionDataFilesArray

protected extractDirectoriesFromExtensionData(array<string|int, mixed> $files) : array<string|int, mixed>
Parameters
$files : array<string|int, mixed>
Return values
array<string|int, mixed>

getRelativePath()

protected getRelativePath(string $absolutePath) : string
Parameters
$absolutePath : string
Return values
string

makeAndClearExtensionDir()

Removes the current extension of $type and creates the base folder for the new one (which is going to be imported)

protected makeAndClearExtensionDir(string $extensionKey) : string
Parameters
$extensionKey : string
Return values
string

reloadPackageInformation()

protected reloadPackageInformation(string $extensionKey) : void
Parameters
$extensionKey : string

writeEmConfToFile()

Constructs emConf and writes it to corresponding file

protected writeEmConfToFile(string $extensionKey, array<string|int, mixed> $emConfData, string $rootPath) : void
Parameters
$extensionKey : string
$emConfData : array<string|int, mixed>
$rootPath : string

writeExtensionFiles()

Loops over an array of files and writes them to the given rootPath

protected writeExtensionFiles(array<string|int, mixed> $files, string $rootPath) : void
Parameters
$files : array<string|int, mixed>
$rootPath : string

        
On this page

Search results