MCPcopy Create free account
hub / github.com/tensorflow/tfjs / constructor

Method constructor

tfjs-data/src/sources/file_data_source.ts:39–43  ·  view source on GitHub ↗

* Create a `FileDataSource`. * * @param input Local file path, or `File`/`Blob`/`Uint8Array` object to * read. Local file only works in node environment. * @param options Options passed to the underlying `FileChunkIterator`s, * such as {chunksize: 1024}.

(
      protected input: FileElement|string,
      protected readonly options: FileChunkIteratorOptions = {})

Source from the content-addressed store, hash-verified

37 * such as {chunksize: 1024}.
38 */
39 constructor(
40 protected input: FileElement|string,
41 protected readonly options: FileChunkIteratorOptions = {}) {
42 super();
43 }
44
45 async iterator(): Promise<ByteChunkIterator> {
46 if (isLocalPath(this.input) && env().get('IS_NODE')) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected