Methods
AutoUpdaterFilesystemHelper constructor.
__construct(\AutoUpdaterSettings $settings, \AutoUpdaterCurlClient $curl, \LogControl $logControl)
Replaces the base directory path of a given file path with a new base directory path.
changeFileBasePath(string $file, string $oldBasePath, string $newBasePath) : string
inherited
Arguments
Response
string
Returns new path of the file. If an error occurs the unmodified file path will be returned.
Checks the unpacked files.
checkUnpackedFiles(\AutoUpdaterUpdate $update, string $updateFilesDirectory)
|
|
Throws |
- \AutoUpdaterCouldNotExtractUpdateZipException
If unpacked file is not ok.
|
Arguments
$updateFilesDirectory
string
Copies a file.
copyFile(string $source, string $destination) : boolean
inherited
Arguments
Response
boolean
Creates a new debug log.
createDebugLog(string $message, string|array $additionalData = '')
Arguments
$additionalData
string|array
Return true on success, otherwise false.
createDirectory(string $directory, boolean $writable = false) : boolean
inherited
Arguments
$directory
string
Path of the new directory.
Response
boolean
Deletes a directory. Return true on success and false otherwise.
deleteDirectory(string $directory) : boolean
inherited
Arguments
Response
boolean
Copies a file.
deleteFile(string $file) : boolean
inherited
Arguments
Response
boolean
Downloads an external file with curl.
downloadExternalFile(string $url, string $destination)
downloadingFilesDone
downloadingFilesDone()
Downloads a zip archive of a given update and extracts it. If the zip extension is not available on the web
server, the downloadUpdateFilesSeparately method will be used as a fallback.
downloadUpdate(\AutoUpdaterUpdate $update, string $updateFilesDirectory, integer|null $lastDownloadedIndex = null)
|
|
Throws |
- \AutoUpdaterUpdateDownloadFailedException
|
Arguments
$updateFilesDirectory
string
$lastDownloadedIndex
integer|null
Downloads all update files of a given update into a given update files directory.
downloadUpdateFilesSeparately(\AutoUpdaterUpdate $update, string $updateFilesDirectory, integer|null $lastDownloadedIndex = null)
This method is a fallback, if the zip extension is not available on the web server.
|
|
Throws |
- \AutoUpdaterUpdateDownloadFailedException
|
Arguments
$updateFilesDirectory
string
$lastDownloadedIndex
integer|null
Returns an array with all files inside a given directory and his subdirectories.
getDirectoryFiles(string $directory) : array
inherited
getLastDownloadedIndex
getLastDownloadedIndex()
getProgress
getProgress()
Registers the auto updater ftp manager.
registerFtpManager(\AutoUpdaterFtpManager $ftpManager)
Sets the file permissions and ownership correctly.
setCorrectChmodAndOwner(string $file, null|string $chmod = null, null|string $owner = null) : boolean
inherited
Arguments
Response
boolean
Properties
settings
settings : \AutoUpdaterSettings
inherited
curl
curl : \AutoUpdaterCurlClient
ftpManager
ftpManager : \AutoUpdaterFtpManager
inherited
logControl
logControl : \LogControl
lastDownloadedIndex
lastDownloadedIndex : integer
downloadingFilesDone
downloadingFilesDone : boolean
progress
progress : float
ajaxTimeout
ajaxTimeout : integer