You are here

public function SassCompiler::addDir in Sassy 7

File

phamlp/sassc.php, line 110

Class

SassCompiler

Code

public function addDir($dir) {
  if (is_dir($dir)) {
    if ($handle = opendir($dir)) {
      while (($file = readdir($handle)) !== false) {
        if (substr($file, -5) === '.scss' && is_file($dir . DIRECTORY_SEPARATOR . $file)) {
          $this->_files[] = array(
            'filename' => $dir . DIRECTORY_SEPARATOR . $file,
          );
        }
      }
    }
  }
}