createDirectory()
getExternalDataPath()
getFileExtension()
getInternalDataPath()
getTempDir()
log()
makeWritableByFtpUser()
$_chmodDirectory
$_chmodFile
Helper for file-related functions.
package | XenForo_Helper |
---|
createDirectory(string $path, boolean $createIndexHtml) : boolean
string
Directory path to create
boolean
If true, creates an index.html file in the created directory
boolean
True on successgetExternalDataPath() : string
string
Absolute pathgetFileExtension(string $filename) : string
This only includes the last extension (eg, x.tar.gz -> gz).
string
string
getInternalDataPath() : string
This directory can be moved above the web root.
string
Absolute pathgetTempDir() : string
string
log(string $logName, string $logEntry, boolean $append) : boolean
string
'foo' will write to {internalDataPath}/foo.log
string
The string to write into the log. Line break not required.
boolean
Append the log entry to the end of the existing log. Otherwise, start again.
boolean
True on successful log writemakeWritableByFtpUser(string $file) : boolean
This generally doesn't need to do anything if PHP is running via some form of suexec. It's primarily needed when running as apache.
string
boolean
$_chmodDirectory
$_chmodFile