示例#1
0
 /**
  * 全添付ファイルを取得
  */
 private function getAttaches()
 {
     static $files;
     $files = FileUtility::getExists(AttachFile::$dir, true);
     // ページに含まれる添付ファイルがない場合ここで終了
     if (!isset($files[$this->page][$this->filename])) {
         return;
     }
     return $files[$this->page][$this->filename];
 }
示例#2
0
 /**
  * 添付ファイルを取得
  * @return array
  */
 public function attach($with_hidden = false)
 {
     $files = FileUtility::getExists(AttachFile::$dir, true);
     // ページに含まれる添付ファイルがない場合ここで終了
     if (!isset($files[$this->page])) {
         return;
     }
     return $files[$this->page];
 }
示例#3
0
 /**
  * 名前変更
  * string $to 変更先の名前
  * @return boolean
  */
 public function rename($to)
 {
     if (empty($to)) {
         throw new Exception('AbsructFile::rename(): New name is undefined.');
     }
     FileUtility::clearCache();
     return rename($this->filename, $to);
 }