parseListMLSD.d.ts 845 B

1234567891011121314151617181920
  1. import { FileInfo } from "./FileInfo";
  2. /**
  3. * Returns true if a given line might be part of an MLSD listing.
  4. *
  5. * - Example 1: `size=15227;type=dir;perm=el;modify=20190419065730; test one`
  6. * - Example 2: ` file name` (leading space)
  7. */
  8. export declare function testLine(line: string): boolean;
  9. /**
  10. * Parse single line as MLSD listing, see specification at https://tools.ietf.org/html/rfc3659#section-7.
  11. */
  12. export declare function parseLine(line: string): FileInfo | undefined;
  13. export declare function transformList(files: FileInfo[]): FileInfo[];
  14. /**
  15. * Parse date as specified in https://tools.ietf.org/html/rfc3659#section-2.3.
  16. *
  17. * Message contains response code and modified time in the format: YYYYMMDDHHMMSS[.sss]
  18. * For example `19991005213102` or `19980615100045.014`.
  19. */
  20. export declare function parseMLSxDate(fact: string): Date;