public function compileFile($fromFilename, $toFilename, $type)
 {
     $path = new Concentrate_Path($toFilename);
     $path->writeDirectory();
     $this->compileInternal($fromFilename, true, $toFilename, $type);
     return $this;
 }
Example #2
0
 public function filterFile($fromFilename, $toFilename, $type = '')
 {
     if (!is_readable($fromFilename)) {
         throw new Concentrate_FileException("Could not read {$fromFilename} for filtering.", 0, $fromFilename);
     }
     $path = new Concentrate_Path($toFilename);
     $path->writeDirectory();
     $content = file_get_contents($fromFilename);
     $content = $this->filter($content, $type);
     file_put_contents($toFilename, $content);
     return $this;
 }