Variable defaultConst

default: {
    baseName: ((aPath: string) => string);
    fileSize: ((aPath: string) => number);
    isDirectory: ((aPath: string) => boolean);
    lsDirectory: ((aPath: string) => string[]);
} = ...

Type declaration

  • baseName: ((aPath: string) => string)
      • (aPath): string
      • Given a string aPath, and assuming it corresponds to a valid path string, return the base name of the file associated to that string.

        Parameters

        • aPath: string

        Returns string

        the file name without the leading directories

  • fileSize: ((aPath: string) => number)
      • (aPath): number
      • Given a string aPath,and assuming it corresponds to a valid path string, return the file size in bytes of the file.

        Parameters

        • aPath: string

        Returns number

        the size of the file in bytes

  • isDirectory: ((aPath: string) => boolean)
      • (aPath): boolean
      • Given a string aPath, returns a boolean telling if this string is a directory or not.

        Parameters

        • aPath: string

        Returns boolean

        if aPath is a directory

  • lsDirectory: ((aPath: string) => string[])
      • (aPath): string[]
      • Given a string aPath, and assuming it corresponds to a valid directory on the filesystem, return an array of strings corresponding to the files in that directory.

        Parameters

        • aPath: string

        Returns string[]

        an array of strings