UNPKG

@zazuko/rdf-utils-fs

Version:
13 lines (12 loc) 586 B
import type { Environment } from '@rdfjs/environment/Environment.js'; import type { FormatsFactory } from '@rdfjs/formats/Factory.js'; import { Readable } from 'readable-stream'; import type { Stream } from '@rdfjs/types'; export interface FromFileOpts extends Record<string, unknown> { extensions?: Record<string, string>; /** * Use the file path as base IRI */ implicitBaseIRI?: boolean; } export default function fromFile(env: Environment<FormatsFactory>, pathOrUrl: string | URL, { implicitBaseIRI, extensions, ...options }?: FromFileOpts): Stream & Readable;