standardPaths - multiple declarations

Function standardPaths

Get paths for various locations.

string[] standardPaths (
  StandardPath type
) nothrow @safe;

Returns

Array of paths where files of type belong including one returned by writablePath, or an empty array if no paths are defined for type. This function does not ensure if all returned paths exist and appear to be accessible directories. Returned strings are not required to be unique.

Note

This function does not cache its results. It may cause performance impact to call this function often since retrieving some paths can be relatively expensive operation.

Example

string[] templateDirs = standardPaths(StandardPath.templates);
//List all available file templates including system defined and user created ones.

See Also

StandardPath, writablePath

Function standardPaths

Evaluate paths for various locations and append subfolder.

string[] standardPaths (
  StandardPath type,
  string subfolder
) nothrow @safe;

Example

enum organizationName = "MyLittleCompany";
enum applicationName = "MyLittleApplication";

string[] appDataDirs = standardPaths(StandardPath.data, buildPath(organizationName, applicationName));
//Gather data files for this application from each found directory.