listDirectory | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...
    • List a directory, recursive

      Parameters

      • basepath: string

        Starting path. Can be absolute or relative to the current working directory. The returned fullPaths will be absolute, and the subPaths will be relative to this basepath

      • Optionaloptions: {
            allowMissing?: boolean;
            mask?: string | RegExp;
            recursive?: boolean;
            skip?: string | RegExp;
        }
        • OptionalallowMissing?: boolean

          If true, a missing directory will be treated as an empty directory instead of throwing an error

        • Optionalmask?: string | RegExp

          If set, only entries with a name matching the mask (string with wildcards or RegExp) will be returned

        • Optionalrecursive?: boolean

          If true, subdirectories will be listed as well. The returned entries will have their subPath relative to the basepath

        • Optionalskip?: string | RegExp

          If set, entries with a name matching the skip mask (string with wildcards or RegExp) will be ignored, and directories masking the name will not be recursed into

      Returns Promise<ListDirectoryEntry[]>

      An array of directory entries. Each entry has a name, type, fullPath, and subPath (relative to the basepath)