Version: 2
restore

Contents

Method

FindFileBySizeAndHash

ModuleFileSystem
LibraryCore
Action

Finds a file by size and hash.

Parameters

Size (int): the size in bytes of the file.

Hash (string): the SHA-256 hash of the file.

Fast (boolean; optional, true): chooses between the fast (and beta) search technology or the previous slower (but fully reliable) technology.

Return values

For each file found:

    • FileName (string): The full path.
Example
 FileSystem.FindFileBySizeAndHash(Size:402, Hash:"8eda0d394c2370c4ac8562d5ae6b5e7b01f347940bc58a65ca873c33a33475a3");
Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android - no
Notes

This will search all fixed disks which is an expensive process and may take some time.

Currently files locked by some other process cannot be hashed and therefore cannot be reported as being found. This is not supported.

This will not search for files on remote machines.

This works slightly different on Windows and Non-Windows platform when the given file or folder, where file resides do not have any permissions assigned/available.

Windows platform does not report such locked down files whereas Non-windows does report the files irrespective of which level permission has been denied (file or folder). This happens because the tachyon.agent service runs as "root" (superuser)