MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / createFile

Function createFile

out/cli.cjs:75655–75662  ·  view source on GitHub ↗
(content, name, options = {})

Source from the content-addressed store, hash-verified

75653}
75654function getRawContent(blob) {
75655 if (hasRawContent(blob)) {
75656 return blob[rawContent]();
75657 } else {
75658 return blob.stream();
75659 }
75660}
75661function createFile(content, name, options = {}) {
75662 var _a5, _b2, _c2;
75663 if (isNode) {
75664 return Object.assign(Object.assign({}, unimplementedMethods), { type: (_a5 = options.type) !== null && _a5 !== void 0 ? _a5 : "", lastModified: (_b2 = options.lastModified) !== null && _b2 !== void 0 ? _b2 : (/* @__PURE__ */ new Date()).getTime(), webkitRelativePath: (_c2 = options.webkitRelativePath) !== null && _c2 !== void 0 ? _c2 : "", size: content.byteLength, name, arrayBuffer: async () => content.buffer, stream: () => new Blob([content]).stream(), [rawContent]: () => content });
75665 } else {

Callers 3

processFormDataValueFunction · 0.85
getAudioTranscriptionFunction · 0.85
getAudioTranslationFunction · 0.85

Calls 1

streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…