TwistPHP Documentation

directoryHash

File path: dist/twist/Core/Utilities/File.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

directoryHashGet a unique Hash of a directory in MD5 or SHA1. If any single item within the directory or sub-directories changes the unique hash will change as well.

Parameters

Name Type Description
$dirPathstringn/a
[$strHashAlgorithm = 'md5']stringn/a

Return Values

void — No return information has been documented for this function.

Example

<?php
//Set the variables for the example
$dirPath '/home/user/public_html/twist';
$strHashAlgorithm 'md5';

//Call the function directoryHash with the example vars
Twist::File() -> directoryHash($dirPath$strHashAlgorithm);