fileHashSync

Type:Function
Status:stable
Since:1.0.0
Platform:node
@blackbyte.sugar.node.fs

This function allows you to get back an integrity hash for the passed file. This mean that if a file returns the same integrity hash twice, the folder or files in it has not been updated…

Params

  1. filePath*-String

    The folder path you want to get the hash back

  2. settings{}TFileHashSettings

    Some settings to configure your hash generation process

Return

  1. -String

    The calculated folder hash

Example

import { fileHashSync } from '@blackbyte/sugar/fs';
fileHashSync('my/cool/folder'); // => YZOrKDx9LCLd8X39PoFTflXGpRU=,

Settings

  1. algo’sha356’String

    The algorithm to use

  2. digest’base64’BinaryToTextEncoding

    How to digest the hash

Todo

  • testsnormal