Repositorio del curso CCOM4030 el semestre B91 del proyecto Artesanías con el Instituto de Cultura

1234567891011121314151617181920212223242526272829303132333435363738
  1. /// <reference types="node"/>
  2. declare const readChunk: {
  3. /**
  4. Read a chunk from a file asyncronously.
  5. @param filePath - The path to the file.
  6. @param startPosition - Position to start reading.
  7. @param length - Number of bytes to read.
  8. @returns The read chunk.
  9. @example
  10. ```
  11. import readChunk = require('read-chunk');
  12. // foo.txt => hello
  13. readChunk.sync('foo.txt', 1, 3);
  14. //=> 'ell'
  15. ```
  16. */
  17. (filePath: string, startPosition: number, length: number): Promise<Buffer>;
  18. /**
  19. Read a chunk from a file synchronously.
  20. @param filePath - The path to the file.
  21. @param startPosition - Position to start reading.
  22. @param length - Number of bytes to read.
  23. @returns The read chunk.
  24. */
  25. sync(filePath: string, startPosition: number, length: number): Buffer;
  26. // TODO: Remove this for the next major release
  27. default: typeof readChunk;
  28. };
  29. export = readChunk;