partial.js logo
Latest version
v1.3.1 (RC2)

FrameworkFileSystem


This class helps with creating files (CSS, JavaScript, views, templates, etc.).

Methods


framework.fs.create.content(name, content, [rewrite], [append])framework.fs.create.css(name, content, [rewrite], [append])framework.fs.create.js(name, content, [rewrite], [append])framework.fs.create.resource(name, content, [rewrite], [append])framework.fs.create.template(name, content, [rewrite], [append])framework.fs.create.temporary(name, stream, [callback])framework.fs.create.view(name, content, [rewrite], [append])framework.fs.create.worker(name, content, [rewrite], [append])framework.fs.rm.content(name)framework.fs.rm.css(name)framework.fs.rm.js(name)framework.fs.rm.resource(name)framework.fs.rm.template(name)framework.fs.rm.temporary(name)framework.fs.rm.view(name)framework.fs.rm.worker(name)
framework.fs.create.content(name, content, [rewrite], [append]);
return Boolean;

Create a content file into the framework.config['directory-contents'].

framework.fs.create.css(name, content, [rewrite], [append]);
return Boolean;

Create a CSS file into the framework.config['directory-public'] + framework.config['static-url-css'].

framework.fs.create.js(name, content, [rewrite], [append]);
return Boolean;

Create a JS file into the framework.config['directory-public'] + framework.config['static-url-js'].

framework.fs.create.resource(name, content, [rewrite], [append]);
return Boolean;

Create a resource file into the framework.config['directory-resources'].

framework.fs.create.template(name, content, [rewrite], [append]);
return Boolean;

Create a template file into the framework.config['directory-templates'].

framework.fs.create.temporary(name, stream, [callback]);
return Boolean;

Create a file into the framework.config['directory-temp'].

framework.fs.create.view(name, content, [rewrite], [append]);
return Boolean;

Create a view file into the framework.config['directory-views'].

framework.fs.create.worker(name, content, [rewrite], [append]);
return Boolean;

Create a worker file into the framework.config['directory-workers'].

framework.fs.rm.content(name);
return Boolean;

Delete a content file from framework.config['directory-contents'].

framework.fs.rm.css(name);
return Boolean;

Delete a CSS file from framework.config['directory-public'] + framework.config['static-url-css'].

framework.fs.rm.js(name);
return Boolean;

Delete a JS file from framework.config['directory-public'] + framework.config['static-url-js'].

framework.fs.rm.resource(name);
return Boolean;

Delete a resource file from framework.config['directory-resources'].

framework.fs.rm.template(name);
return Boolean;

Delete a template file from framework.config['directory-templates'].

framework.fs.rm.temporary(name);
return Boolean;

Delete a temporary file from framework.config['directory-temp'].

framework.fs.rm.view(name);
return Boolean;

Delete a view file from framework.config['directory-views'].

framework.fs.rm.worker(name);
return Boolean;

Delete a worker file from framework.config['directory-workers'].