Home > @cerbos/files > readDirectory
Read the policy and schema files in a directory and its subdirectories.
Signature:
export declare function readDirectory(path: string): Promise<DirectoryContents>;
Parameter |
Type |
Description |
---|---|---|
path |
string |
the path to the directory. |
Returns:
Promise<DirectoryContents>
This function looks for policies and schemas stored in the standard Cerbos directory layout.