die('invalid');
}
- static function getAssetDir($type)
+ static function getCompileDir($type)
{
- if(!in_array($type, array(
-
- ))) {
+ if(empty($type)) {
return false;
}
+
+ $ui = posix_getpwuid(posix_geteuid());
+
+ $ff = HTML_FlexyFramework::get();
+
+ $compile_dir = session_save_path() . '/' . implode("-", array(
+ $ui['name'],
+ $ff->project,
+ $ff->version,
+ "{$type}compile"
+ ));
+
+ if (file_exists($compile_dir)) {
+ return $compile_dir;
+ }
+
+ if(mkdir($compile_dir, 0700, true)) {
+ return $compile_dir;
+ }
+
+ return false;
}
}