From d9582107b460bcf03bb5552e8a4591166b121f2f Mon Sep 17 00:00:00 2001 From: nbm Date: Sun, 6 Nov 2005 10:47:16 +0000 Subject: [PATCH] Add temporaryFile and freeTemporaryFile for whenever one needs a (read-only) physical file to work on. --- lib/storage/ondiskpathstoragemanager.inc.php | 9 +++++++++ 1 file changed, 9 insertions(+), 0 deletions(-) diff --git a/lib/storage/ondiskpathstoragemanager.inc.php b/lib/storage/ondiskpathstoragemanager.inc.php index cbf3144..35242f7 100644 --- a/lib/storage/ondiskpathstoragemanager.inc.php +++ b/lib/storage/ondiskpathstoragemanager.inc.php @@ -73,6 +73,15 @@ class KTOnDiskPathStorageManager extends KTStorageManager { $sStoragePath = sprintf("%s/%s", Document::_generateFolderPath($oDocument->getFolderID()), $oDocument->getFileName()); return $sStoragePath; } + + function temporaryFile(&$oDocument) { + $oConfig =& KTConfig::getSingleton(); + return sprintf("%s/%s", $oConfig->get('urls/documentRoot'), $this->getPath($oDocument)); + } + + function freeTemporaryFile($sPath) { + return; + } function download($oDocument) { //get the path to the document on the server -- libgit2 0.21.4