FileManifest

Stores the file manifest for this Winter CMS installation.

 class System\Classes\FileManifest

This manifest is a file checksum of all files within this Winter CMS installation. When compared to the source manifest, this allows us to determine the current installation's build number.

Properties

protected $files : array

Files cache.

protected $modules : array

Modules to store in manifest.

protected $normalizeExtensions : array

File extensions to normalize newlines for

protected $root : string

Root folder of this installation.

Methods

public __construct ($root = null, $modules = null)

Constructor.

Parameters
Property Description
$root
mixed
$modules
mixed
Returns
mixed

public getFiles () : array

Gets a list of files and their corresponding hashsums.

Returns
array

public getModuleChecksums () : array

Gets the checksum of a specific install.

Returns
array

public setModules (array $modules) : static

Sets the modules.

Parameters
Property Description
$modules
array
Returns
static

public setRoot (string $root) : static

Sets the root folder.

Parameters
Property Description
$root
string
Returns
static

protected findFiles (string $basePath) : array

Finds all files within the path.

Parameters
Property Description
$basePath
string
Returns
array

protected getFilename (string $file) : string

Returns the filename without the root.

Parameters
Property Description
$file
string
Returns
string

protected normalizeFileContents (string $file) : string

Normalises the file contents, irrespective of OS.

Parameters
Property Description
$file
string
Returns
string
Copyright © 2024 Winter CMS