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, StrictMode mode)
    deprecated
    readPackageRecipe
    (
    string filename
    ,
    string parent = null
    ,
    StrictMode mode = StrictMode.Ignore
    )
  2. PackageRecipe readPackageRecipe(NativePath filename, string parent, StrictMode mode)
  3. PackageRecipe readPackageRecipe(NativePath filename, PackageName parent, StrictMode mode)

Parameters

filename string

NativePath of the package recipe file

parent 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