Whether or not the directory structure was auto-generated from compass create. Note: auto-generation is determined by the existence of the sass and stylesheets directories
481947
function wasCompassCreate() {
  return q.all([utils.exists('sass'), utils.exists('stylesheets')])
    .then(function (results) {
      return results[0] && results[1];
    });
}
64556
def mkdir_interactive(dirpath):
    
    from benchbuild.utils.cmd import mkdir
    if os.path.exists(dirpath):
        return

    response = ui.ask(
        "The directory {dirname} does not exist yet. "
        "Should I create it?".format(dirname=dirpath),
        default_answer=True,
        default_answer_str="yes")

    if response:
        mkdir("-p", dirpath)
        print("Created directory {0}.".format(dirpath))
1319371
def check_path(path, create=False):
    
    if not os.path.exists(path):
        if create:
            os.makedirs(path)
            return os.path.exists(path)
        else:
            return False

    return True
968588
def compile_scss
        puts "\nCompiling assets for stylestats...".color(:blue)
        if is_rails?

          # Get rake tasks
          Rails.application.load_tasks unless @config.is_dev?
          compile_scss_rails
        else

          load_compass

          compile_scss
        end
      end
307839
function checkAndOrCreateDir($dir, $create = false, $perm = '0777')
    {
        if(is_dir($dir) && is_writable($dir)) return true;
        elseif($create === false) return false;

        @mkdir($dir, $perm, true);
        @chmod($dir, $perm);

        if(is_writable($dir)) return true;
        return false;
    }
1157784
def build
      return false if @generated
      logger.info("--> #{path}")
      @dependencies = Set.new
      file.parent.mkpath
      if input.template?
        evaluate_template
      else
        copy_resource
      end
      @generated = true
    end
748518
def _initIndexDir(self):
        """"""
        if not os.path.exists(self.logdir):
            os.mkdir(self.logdir)
            dprint(1, "created", self.logdir)
        Purr.RenderIndex.initIndexDir(self.logdir)
438188
def has_dir(state, fname, incorrect_msg="Did you create a directory named `{}`?"):
    """"""
    if not Path(fname).is_dir():
        state.report(Feedback(incorrect_msg.format(fname)))

    return state
697406
def create_stylesheets
      template 'stylesheets/myg.scss', "#{stylesheets_dir}/myg.scss"
      template 'stylesheets/variables/_action-button.scss',
               "#{stylesheets_dir}/variables/_action-button.scss"
      template 'stylesheets/variables/_animate.scss',
               "#{stylesheets_dir}/variables/_animate.scss"
      template 'stylesheets/variables/_base.scss',
               "#{stylesheets_dir}/variables/_base.scss"
      template 'stylesheets/variables/_font.scss',
               "#{stylesheets_dir}/variables/_font.scss"
      template 'stylesheets/variables/_footer.scss',
               "#{stylesheets_dir}/variables/_footer.scss"
      template 'stylesheets/variables/_grid.scss',
               "#{stylesheets_dir}/variables/_grid.scss"
      template 'stylesheets/variables/_layout.scss',
               "#{stylesheets_dir}/variables/_layout.scss"
      template 'stylesheets/variables/_spacing.scss',
               "#{stylesheets_dir}/variables/_spacing.scss"
      template 'stylesheets/variables/_text.scss',
               "#{stylesheets_dir}/variables/_text.scss"
      template 'stylesheets/variables/_theme.scss',
               "#{stylesheets_dir}/variables/_theme.scss"
      template 'stylesheets/theme/theme.scss',
               "#{stylesheets_dir}/theme/theme.scss"
      template 'stylesheets/theme/_custom.scss',
               "#{stylesheets_dir}/theme/_custom.scss"
    end
1299831
def check_autosign_grains(self, autosign_grains):
        '''
        
        '''
        if not autosign_grains or 'autosign_grains_dir' not in self.opts:
            return False

        autosign_grains_dir = self.opts['autosign_grains_dir']
        for root, dirs, filenames in os.walk(autosign_grains_dir):
            for grain in filenames:
                if grain in autosign_grains:
                    grain_file = os.path.join(autosign_grains_dir, grain)

                    if not self.check_permissions(grain_file):
                        log.warning(
                            'Wrong permissions for %s, ignoring content',
                            grain_file
                        )
                        continue

                    with salt.utils.files.fopen(grain_file, 'r') as f:
                        for line in f:
                            line = salt.utils.stringutils.to_unicode(line).strip()
                            if line.startswith('#'):
                                continue
                            if autosign_grains[grain] == line:
                                return True
        return False
7327
def is_build_dir(self, folder_name):
        """"""
        # Cannot move up to base scraper due to parser.entries call in
        # get_build_info_for_date (see below)

        url = '%s/' % urljoin(self.base_url, self.monthly_build_list_regex, folder_name)
        if self.application in APPLICATIONS_MULTI_LOCALE \
                and self.locale != 'multi':
            url = '%s/' % urljoin(url, self.locale)

        parser = self._create_directory_parser(url)

        pattern = re.compile(self.binary_regex, re.IGNORECASE)
        for entry in parser.entries:
            try:
                pattern.match(entry).group()
                return True
            except Exception:
                # No match, continue with next entry
                continue
        return False
1336656
private function createPathIfNeeded()
    {
        if (!is_dir($this->directory)) {
            return @mkdir($this->directory, 0777 & (~$this->umask), true) && !is_dir($this->directory);
        }

        return true;
    }
549818
@SuppressWarnings("unused")
	private void genDirStructure() throws IOException {
		BufferedReader in = new BufferedReader(new FileReader(new File(inDir,
				StructureGenerator.DIR_STRUCTURE_FILE_NAME)));
		String line;
		while ((line = in.readLine()) != null) {
			fs.mkdirs(new Path(root + line));
		}
	}
767067
protected function createMissingFolders(): bool
    {
        $success = true;
        foreach (self::$folderPathKeys as $key) {
            $success = $success && $this->createFolder($this->extSettings[$key]);
        }
        $success = $success && $this->createFile($this->extSettings['json']);
        return $success;
    }
286183
function () {
    // @global - directories
    directories = {
        blocks: path.join( serverConfig.webroot, "blocks" ),
        collections: path.join( serverConfig.webroot, "collections" ),
        assets: path.join( serverConfig.webroot, "assets" ),
        pages: path.join( serverConfig.webroot, "pages" ),
        scripts: path.join( serverConfig.webroot, "scripts" ),
        styles: path.join( serverConfig.webroot, "styles" ),
        presets: path.join( serverConfig.webroot, "presets" )
    };

    // @global - keyFiles
    keyFiles = {
        indexList: fs.existsSync( path.join( directories.collections, "index.list" ) ),
        folderList: fs.existsSync( path.join( directories.collections, "folder.list" ) )
    };

    // Set directories on external modules
    sqsTemplate.setDirs( directories );
}
950623
private boolean isCreateFolderMode() {

        CmsSitemapController controller = getHoverbar().getController();
        CmsSitemapData data = controller.getData();
        return data.isCreateNewFoldersForSubsitemaps()
            && (data.getSubsitemapFolderTypeInfos() != null)
            && !data.getSubsitemapFolderTypeInfos().isEmpty();
    }
471555
function generateLayers () {
			grunt.log.write("Generating layers...");

			var config = lang.extend({}, requireConfig, {
				isPrepareStage: true,
				optimize: "none",
				optimizeCss: "none",
				appDir: buildDir,
				dir: tempDir,
				baseUrl: "./",
				logLevel: 2, // WARN
				removeCombined: false,
				skipDirOptimize: true,
				keepBuildDir: false,
				skipSemiColonInsertion: true,
				pragmas: {
					prepare: true,
					build: true
				},
				// Pragmas for rjs plugins:
				pragmasOnSave: {
					prepareSave: true
				},
				// main (root) modules:
				modules: modules.map(function (module) { return { name: module }; }),
				onBuildWrite: function (moduleName, modulePath, contents) {
					// put moduleName into some layer basing on its path
					layers.some(function (layer) {
						var relPath = path.relative(path.resolve(config.dir), modulePath);
						var layerDir = layer.dir;
						if (!Array.isArray(layerDir)) {
							layerDir = [layerDir];
						}
						layerDir.forEach(function(dir) {
							if (relPath.indexOf(dir) === 0) {
								if (options.ignoreModules) {
									if (options.ignoreModules.some(function (m) {
										return m === moduleName;
									})) {
										return;
									}
								}
								layer.modules[moduleName] = true;
							}
						});
					});
					if (moduleName.indexOf('xhtmpl!') === 0) {
						modulesToDelete.push(path.join(outputDir, modulePath.slice('xhtmpl!'.length)));

						// Manually save pre-compiled template back into buildDir as
						// we're currently saving into tempDir (that's why we can't rely on returning content)

						// NOTE: manually remove leading semicolon
						// TODO: the code should be removed after migrating on 2.1.9 (with skipSemiColonInsertion support)
						if (contents.charAt(contents.length-1) === ";") {
							contents = contents.slice(0, contents.length-1);
						}
						file.saveFile(path.join(buildDir, modulePath.slice('xhtmpl!'.length)), contents);
					}
					//return contents;
					return "// this is a stub for finding layer's dependencies: moduleName=" + moduleName;
				}
			});

			requirejs.optimize(
				config,
				lang.safeCallback(function () {
					// create layer modules using 'layers' structure created in onBuildWrite:
					// every 'layer module' is an empty RJS module with imports (via define([..])) of all modules inside this layer
					layers.forEach(function (layer) {
						var modules = Object.keys(layer.modules).sort(),
							content = "define([\n\t\"" + modules.join("\",\n\t\"") + "\"\n], function () {});";
						file.saveFile(path.join(buildDir, layer.name) + ".js", content);
					});

					grunt.log.writeln('OK'.green);

					// Go to next step
					optimizeModules();
				}),
				lang.errorCallback
			);
		}