Skip to content

resolveNetworkFile

resolveNetworkFile(site, roots): Promise<string>

Defined in: resolveSiteFiles.ts:129

Find the networks/*.network-meta.xml file whose <site> element names a CustomSite.

Every .network-meta.xml file under the search roots is opened to check its <site> value, since the Network’s own file name doesn’t have to match the CustomSite’s API name.

string

The CustomSite API name to search for.

string[]

Root directories to search, from resolveSearchRoots.

Promise<string>

The absolute path to the matched network file.

CommunityUrlNetworkFileNotFoundError if no file’s <site> matches.

CommunityUrlNetworkFileAmbiguousError if more than one file’s <site> matches.