You are here

public function SassCompiler::getFiles in Sassy 7

1 call to SassCompiler::getFiles()
SassCompiler::compile in phamlp/sassc.php

File

phamlp/sassc.php, line 93

Class

SassCompiler

Code

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