Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
_performPeriodicCleanup () | |
deleteById ($fileId, $userId) | |
downloadById ($fileId, $userId, $inline=false) | |
getBasePath () | |
getFile ($fileId, $userId) | |
handleUpload ($fileName, $userId) | |
submissionToTemporaryFile ($submissionFile, $userId) | |
![]() | |
compressFile ($filePath) | |
copyDir ($source, $dest) | |
copyFile ($source, $dest) | |
decompressFile ($filePath) | |
deleteByPath ($filePath) | |
downloadByPath ($filePath, $mediaType=null, $inline=false, $fileName=null) | |
fileExists ($filePath, $type='file') | |
getDocumentExtension ($type) | |
getDocumentType ($type) | |
getExtension ($fileName) | |
getFirstUploadedPostName () | |
getImageExtension ($type) | |
getNiceFileSize ($size) | |
getUploadedFileName ($fileName) | |
getUploadedFilePath ($fileName) | |
getUploadedFileType ($fileName) | |
getUploadErrorCode ($fileName) | |
mkdir ($dirPath, $perms=null) | |
mkdirtree ($dirPath, $perms=null) | |
parseFileExtension ($fileName) | |
readFileFromPath ($filePath, $output=false) | |
rmdir ($dirPath) | |
rmtree ($file) | |
setMode ($path, $mask) | |
truncateFileName ($fileName, $length=127) | |
uploadedFileExists ($fileName) | |
uploadError ($fileName) | |
uploadFile ($fileName, $destFileName) | |
writeFile ($dest, &$contents) | |
Additional Inherited Members | |
![]() | |
$filesDir | |
Definition at line 19 of file TemporaryFileManager.inc.php.
TemporaryFileManager::__construct | ( | ) |
Constructor
Reimplemented from PrivateFileManager.
Definition at line 23 of file TemporaryFileManager.inc.php.
References _performPeriodicCleanup().
TemporaryFileManager::_performPeriodicCleanup | ( | ) |
Perform periodic cleanup tasks. This is used to occasionally remove expired temporary files.
Definition at line 156 of file TemporaryFileManager.inc.php.
References deleteById(), and DAORegistry\getDAO().
Referenced by __construct().
TemporaryFileManager::deleteById | ( | $fileId, | |
$userId | |||
) |
Delete a file by ID.
$fileId | int |
Definition at line 50 of file TemporaryFileManager.inc.php.
References getBasePath(), DAORegistry\getDAO(), and getFile().
Referenced by _performPeriodicCleanup().
TemporaryFileManager::downloadById | ( | $fileId, | |
$userId, | |||
$inline = false |
|||
) |
Download a file.
$fileId | int the file id of the file to download |
$inline | print file as inline instead of attachment, optional |
Definition at line 65 of file TemporaryFileManager.inc.php.
References getBasePath(), and getFile().
TemporaryFileManager::getBasePath | ( | ) |
Get the base path for temporary file storage.
Reimplemented from PrivateFileManager.
Definition at line 33 of file TemporaryFileManager.inc.php.
Referenced by deleteById(), downloadById(), and handleUpload().
TemporaryFileManager::getFile | ( | $fileId, | |
$userId | |||
) |
Retrieve file information by file ID.
Definition at line 41 of file TemporaryFileManager.inc.php.
References DAORegistry\getDAO().
Referenced by deleteById(), and downloadById().
TemporaryFileManager::handleUpload | ( | $fileName, | |
$userId | |||
) |
Upload the file and add it to the database.
$fileName | string index into the $_FILES array |
$userId | int |
Definition at line 81 of file TemporaryFileManager.inc.php.
References FileManager\fileExists(), getBasePath(), Core\getCurrentDate(), DAORegistry\getDAO(), FileManager\getUploadedFileName(), PKPString\mime_content_type(), FileManager\mkdirtree(), FileManager\parseFileExtension(), FileManager\truncateFileName(), and FileManager\uploadFile().
TemporaryFileManager::submissionToTemporaryFile | ( | $submissionFile, | |
$userId | |||
) |
Create a new temporary file from a submission file.
$submissionFile | object |
$userId | int |
Definition at line 120 of file TemporaryFileManager.inc.php.
References FileManager\fileExists(), Core\getCurrentDate(), DAORegistry\getDAO(), FileManager\mkdirtree(), and FileManager\parseFileExtension().