• Checks if a file exists inside the uploads-folder on the configured HBO-ICT.Cloud environment.

    Parameters

    • fileName: string

      Path to the file to check for existence, can contain forward slashes (/) to access subfolders.

    Returns Promise<boolean | ApiFailReason>

    Returns a promise which can either fail (string with reason) or succeed (boolean set to true if file exists, otherwise false).

    Throws

    When the API has not been properly configured using configure, an exception is thrown detailing the missing information.

    Example

    Below is a simplified example.

    import { api } from "@hboictcloud/api";

    const data = await api.fileExists("test.png");
    console.log(data);

Generated using TypeDoc