UNPKG

@specs-feup/lara

Version:

A js port of the popular framework for building source-to-source compilers

42 lines 1.55 kB
import { JavaClasses } from "./JavaTypes.js"; /** * Provides access to files in a specific folder. */ export default class LocalFolder { baseFolder: JavaClasses.File; constructor(foldername: string | JavaClasses.File); /** * @returns A java File that represents the root of this LocalFolder */ getBaseFolder(): JavaClasses.File; /** * Returns a file from the path relative to the LocalFolder location. * * <p>If the path does not exist, or is not a file, throws an exception. * * @returns A java File representing the given path relative to this LocalFolder */ getFile(path: string | JavaClasses.File): JavaClasses.File; /** * Returns a folder from the path relative to the LocalFolder location. * * <p>If the path does not exist, or is not a folder, throws an exception. * * @returns A java File representing the given path relative to this LocalFolder */ getFolder(path: string | JavaClasses.File): JavaClasses.File; hasFolder(path: string | JavaClasses.File): boolean; /** * @returns String with the contents of the given path */ getString(path: string | JavaClasses.File): string; /** * @returns Decodes the specified file as a JSON file. */ getJson(path: string | JavaClasses.File): object; /** * @returns A java List with all the files in this LocalFolder */ getFileList(path?: string | JavaClasses.File): JavaClasses.List<JavaClasses.File>; } //# sourceMappingURL=LocalFolder.d.ts.map