Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
PublicFileManager Class Reference
Inheritance diagram for PublicFileManager:
PKPPublicFileManager FileManager

Public Member Functions

 copyJournalFile ($journalId, $sourceFile, $destFileName)
 
 getJournalFilesPath ($journalId)
 
 PublicFileManager ()
 
 removeJournalFile ($journalId, $fileName)
 
 uploadJournalFile ($journalId, $fileName, $destFileName)
 
 writeJournalFile ($journalId, $destFileName, &$contents)
 
- Public Member Functions inherited from PKPPublicFileManager
 getSiteFilesPath ()
 
 PKPPublicFileManager ()
 
 removeSiteFile ($fileName)
 
 uploadSiteFile ($fileName, $destFileName)
 
- Public Member Functions inherited from FileManager
 copyDir ($source, $dest)
 
 copyFile ($source, $dest)
 
 deleteFile ($filePath)
 
 downloadFile ($filePath, $mediaType=null, $inline=false, $fileName=null)
 
 fileExists ($filePath, $type= 'file')
 
 FileManager ()
 
 getDocumentExtension ($type)
 
 getDocumentType ($type)
 
 getExtension ($fileName)
 
 getImageExtension ($type)
 
 getNiceFileSize ($size)
 
 getUploadedFileName ($fileName)
 
 getUploadedFilePath ($fileName)
 
 getUploadedFileType ($fileName)
 
 mkdir ($dirPath, $perms=null)
 
 mkdirtree ($dirPath, $perms=null)
 
 parseFileExtension ($fileName)
 
readFile ($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 PublicFileManager.inc.php.

Member Function Documentation

PublicFileManager::copyJournalFile (   $journalId,
  $sourceFile,
  $destFileName 
)

Copy a file to a journals's public directory.

Parameters
$journalIdint
$sourceFilestring the source of the file to copy
$destFileNamestring the destination file name
Returns
boolean

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

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

PublicFileManager::getJournalFilesPath (   $journalId)

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

Parameters
$journalIdint
Returns
string

Definition at line 32 of file PublicFileManager.inc.php.

References Config\getVar().

Referenced by copyJournalFile(), removeJournalFile(), uploadJournalFile(), and writeJournalFile().

PublicFileManager::PublicFileManager ( )

Constructor

Definition at line 23 of file PublicFileManager.inc.php.

PublicFileManager::removeJournalFile (   $journalId,
  $fileName 
)

Delete a file from a journal's public directory.

Parameters
$journalIdint
$fileNamestring the target file name
Returns
boolean

Definition at line 75 of file PublicFileManager.inc.php.

References FileManager\deleteFile(), and getJournalFilesPath().

PublicFileManager::uploadJournalFile (   $journalId,
  $fileName,
  $destFileName 
)

Upload a file to a journals's public directory.

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

Definition at line 43 of file PublicFileManager.inc.php.

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

PublicFileManager::writeJournalFile (   $journalId,
  $destFileName,
$contents 
)

Write a file to a journals's public directory.

Parameters
$journalIdint
$destFileNamestring the destination file name
$contentsstring the contents to write to the file
Returns
boolean

Definition at line 54 of file PublicFileManager.inc.php.

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


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