dbprocessing.Diskfile.Diskfile

class dbprocessing.Diskfile.Diskfile(infile, dbu)[source]

Diskfile class contains methods for dealing with files on disk

All parsing for what mission files belong to is continued in here to add a new mission code must be added here.

__init__(infile, dbu)[source]

setup a Diskfile class

takes in a filename and creates a params dict to hold information about the file then tests to see what mission the file is from

Parameters
infilestr

Full path to file to create a Diskfile around

dbuDButils

Pass in the current session so that a new connection is not made

Methods

checkAccess()

Tests of the input file to be sure the script has the correct access.

Attributes

checkAccess()[source]

Tests of the input file to be sure the script has the correct access.

Takes no inputs; returns no values. Uses file and raises exceptions if checks fail.

Raises
ReadError

If file isn’t readable.

WriteError

If file isn’t writeable.

infile

Path to the input file. Not validated to be either relative or absolute. (str)

params

Parameters of this file, i.e. metadata. (dict)


Release: 0.1.0 Doc generation date: Feb 10, 2022