Skip to content

Files

58 lines (28 loc) · 919 Bytes

files.readdirectory.md

File metadata and controls

58 lines (28 loc) · 919 Bytes

Home > @cerbos/files > readDirectory

readDirectory() function

Read the policy and schema files in a directory and its subdirectories.

Signature:

export declare function readDirectory(path: string): Promise<DirectoryContents>;

Parameters

Parameter

Type

Description

path

string

the path to the directory.

Returns:

Promise<DirectoryContents>

Remarks

This function looks for policies and schemas stored in the standard Cerbos directory layout.