Skip to content

Instantly share code, notes, and snippets.

@mehlah
Created May 8, 2013 02:26
Show Gist options
  • Save mehlah/5537765 to your computer and use it in GitHub Desktop.
Save mehlah/5537765 to your computer and use it in GitHub Desktop.
Libraries::add('play', array('default' => true, 'resources' => call_user_func(function() {
if (!is_dir($resources = str_replace("//", "/", sys_get_temp_dir() . '/resources'))) {
$paths = array($resources, "{$resources}/tmp/logs", "{$resources}/tmp/cache/templates");
foreach ($paths as $path) {
mkdir($path, 0777, true);
}
}
return $resources;
})));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment