Open Journal Systems  3.3.0
PKPPublicFileManager Class Reference
Inheritance diagram for PKPPublicFileManager:
FileManager PublicFileManager

Public Member Functions

 copyContextFile ($contextId, $sourceFile, $destFileName)
 
 getContextFilesPath ($contextId)
 
 getSiteFilesPath ()
 
 removeContextFile ($contextId, $fileName)
 
 removeSiteFile ($fileName)
 
 uploadContextFile ($contextId, $fileName, $destFileName)
 
 uploadSiteFile ($fileName, $destFileName)
 
 writeContextFile ($contextId, $destFileName, $contents)
 
- Public Member Functions inherited from FileManager
 __construct ()
 
 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)
 

Detailed Description

Wrapper class for uploading files to a site/journal's public directory.

Definition at line 19 of file PKPPublicFileManager.inc.php.

Member Function Documentation

◆ copyContextFile()

PKPPublicFileManager::copyContextFile (   $contextId,
  $sourceFile,
  $destFileName 
)

Copy a file to a context's public directory.

Parameters
$contextIdint Context ID
$sourceFilestring the source of the file to copy
$destFileNamestring the destination file name
Returns
boolean

Definition at line 76 of file PKPPublicFileManager.inc.php.

References FileManager\copyFile(), and getContextFilesPath().

◆ getContextFilesPath()

PKPPublicFileManager::getContextFilesPath (   $contextId)
abstract

Get the path to a context's public files directory.

Parameters
$assocTypeint Assoc type for context
$contextIdint Context ID
Returns
string

Reimplemented in PublicFileManager.

Referenced by copyContextFile(), removeContextFile(), uploadContextFile(), and writeContextFile().

◆ getSiteFilesPath()

PKPPublicFileManager::getSiteFilesPath ( )

Get the path to the site public files directory.

Returns
string

Definition at line 25 of file PKPPublicFileManager.inc.php.

References Config\getVar().

Referenced by removeSiteFile(), and uploadSiteFile().

◆ removeContextFile()

PKPPublicFileManager::removeContextFile (   $contextId,
  $fileName 
)

Delete a file from a context's public directory.

Parameters
$contextIdint Context ID
$fileNamestring the target file name
Returns
boolean

Definition at line 86 of file PKPPublicFileManager.inc.php.

References FileManager\deleteByPath(), and getContextFilesPath().

◆ removeSiteFile()

PKPPublicFileManager::removeSiteFile (   $fileName)

Delete a file from the site's public directory.

Parameters
$fileNamestring the target file name
Returns
boolean

Definition at line 95 of file PKPPublicFileManager.inc.php.

References FileManager\deleteByPath(), and getSiteFilesPath().

◆ uploadContextFile()

PKPPublicFileManager::uploadContextFile (   $contextId,
  $fileName,
  $destFileName 
)

Upload a file to a context's public directory.

Parameters
$contextIdint The context ID
$fileNamestring the name of the file in the upload form
$destFileNamestring the destination file name
Returns
boolean

Definition at line 44 of file PKPPublicFileManager.inc.php.

References getContextFilesPath(), and FileManager\uploadFile().

◆ uploadSiteFile()

PKPPublicFileManager::uploadSiteFile (   $fileName,
  $destFileName 
)

Upload a file to the site's public directory.

Parameters
$fileNamestring the name of the file in the upload form
$destFileNamestring the destination file name
Returns
boolean

Definition at line 65 of file PKPPublicFileManager.inc.php.

References getSiteFilesPath(), and FileManager\uploadFile().

◆ writeContextFile()

PKPPublicFileManager::writeContextFile (   $contextId,
  $destFileName,
  $contents 
)

Write a file to a context's public directory.

Parameters
$contextIdint Context ID
$destFileNamestring the destination file name
$contentsstring the contents to write to the file
Returns
boolean

Definition at line 55 of file PKPPublicFileManager.inc.php.

References getContextFilesPath(), and FileManager\writeFile().


The documentation for this class was generated from the following file: