AbstractAutoUpdaterHelper

Class AbstractAutoUpdaterHelper

package

Default

Methods

Replaces the base directory path of a given file path with a new base directory path.

changeFileBasePath(string $file, string $oldBasePath, string $newBasePath) : string

Arguments

$file

string

$oldBasePath

string

$newBasePath

string

Response

string

Returns new path of the file. If an error occurs the unmodified file path will be returned.

Copies a file.

copyFile(string $source, string $destination) : boolean

Arguments

$source

string

$destination

string

Response

boolean

Return true on success, otherwise false.

createDirectory(string $directory, boolean $writable = false) : boolean

Arguments

$directory

string

Path of the new directory.

$writable

boolean

Response

boolean

Deletes a directory. Return true on success and false otherwise.

deleteDirectory(string $directory) : boolean

Arguments

$directory

string

Response

boolean

Copies a file.

deleteFile(string $file) : boolean

Arguments

$file

string

Response

boolean

Returns an array with all files inside a given directory and his subdirectories.

getDirectoryFiles(string $directory) : array

Arguments

$directory

string

Response

array

Sets the file permissions and ownership correctly.

setCorrectChmodAndOwner(string $file, null|string $chmod = null, null|string $owner = null) : boolean

Arguments

$file

string

$chmod

null|string

$owner

null|string

Response

boolean

Properties

settings

settings : \AutoUpdaterSettings
var

Type(s)

\AutoUpdaterSettings

ftpManager

ftpManager : \AutoUpdaterFtpManager