# dbprocessing

# dbprocessing.Diskfile

Information regarding a file as stored on disk.

Functions

`calcDigest`(infile) | Calculate the SHA1 digest from a file.

Classes

`Diskfile`(infile, dbu) | Diskfile class contains methods for dealing with files on disk

Exceptions

`DigestError`(*params) | Exception that is thrown by calcDigest.
`FilenameError`(*params) | Exception especially for created filenames showing that they are wrong
`InputError`(*params) | Exception that input is bad to the DiskFile class
`ReadError`(*params) | Exception that a file is not readable by the script, probably doesn't exist
`WriteError`(*params) | Exception that a file is not write able by the script

dbprocessing.Diskfile.calcDigest(infile)

  Calculate the SHA1 digest from a file.

  Parameters
    infile `str`

      Path to the file.

  Returns
    hash `str`

      Hex digits of the file’s SHA1 hash (40 bytes).

exception dbprocessing.Diskfile.DigestError(*params)

  Exception that is thrown by calcDigest.

  Notes

  Maybe just combine this with ReadError for the current purpose

exception dbprocessing.Diskfile.FilenameError(*params)

  Exception especially for created filenames showing that they are wrong

exception dbprocessing.Diskfile.InputError(*params)

  Exception that input is bad to the DiskFile class

exception dbprocessing.Diskfile.ReadError(*params)

  Exception that a file is not readable by the script, probably doesn’t exist

exception dbprocessing.Diskfile.WriteError(*params)

  Exception that a file is not write able by the script

  probably doesn’t exist or in a ro directory

Release: 0.1.0 Doc generation date: Feb 10, 2022