public function filestore_pattern($doc)
 {
     global $Opt, $ConfSitePATH;
     if ($this->no_filestore) {
         return false;
     }
     if (self::$_docstore === null) {
         $fdir = opt("docstore");
         if (!$fdir) {
             return self::$_docstore = false;
         }
         $fpath = $fdir;
         $use_subdir = defval($Opt, "docstoreSubdir", false);
         if ($use_subdir && ($use_subdir === true || $use_subdir > 0)) {
             $fpath .= "/%" . ($use_subdir === true ? 2 : $use_subdir) . "h";
         }
         $fpath .= "/%h%x";
         self::$_docstore = array($fdir, $fpath);
     }
     return self::$_docstore;
 }