readPackageRecipe

Reads a package recipe from a file.

The file format (JSON/SDLang) will be determined from the file extension.

  1. PackageRecipe readPackageRecipe(string filename, string parent_name, StrictMode mode)
  2. PackageRecipe readPackageRecipe(NativePath filename, string parent_name, StrictMode mode)
    readPackageRecipe
    (
    NativePath filename
    ,
    string parent_name = null
    ,
    StrictMode mode = StrictMode.Ignore
    )

Parameters

filename NativePath

NativePath of the package recipe file

parent_name string

Optional name of the parent package (if this is a sub package)

mode StrictMode

Whether to issue errors, warning, or ignore unknown keys in dub.json

Return Value

Returns the package recipe contents

Throws

Throws an exception if an I/O or syntax error occurs

Meta