MCPcopy Index your code
hub / github.com/CodeboxIDE/codebox / openNew

Function openNew

client/core/files.js:228–245  ·  view source on GitHub ↗
(name, content, options)

Source from the content-addressed store, hash-verified

226
227 // Open a new file
228 var openNew = function(name, content, options) {
229 name = name || "untitled";
230
231 // Create a temporary file
232 var f = new File({
233 'newFileContent': content || "",
234 'codebox': box
235 }, {
236 'name': name,
237 'size': 0,
238 'mtime': 0,
239 'mime': "text/plain",
240 'href': location.protocol+"//"+location.host+"/vfs/"+name,
241 'exists': false
242 });
243
244 return openFile(f, options);
245 };
246
247 return {
248 'addHandler': addHandler,

Callers

nothing calls this directly

Calls 1

openFileFunction · 0.85

Tested by

no test coverage detected