l.a.n.NascentUploadFile : class documentation

Part of lp.archiveuploader.nascentuploadfile View In Hierarchy

Known subclasses: lp.archiveuploader.dscfile.DSCUploadedFile, lp.archiveuploader.nascentuploadfile.CustomUploadFile, lp.archiveuploader.nascentuploadfile.PackageUploadFile

A nascent uploaded file is a file on disk that is part of an upload.

The filename, along with information about it, is kept here.

Method __init__ Undocumented
Method content_type The content type for this file.
Method filename Return the NascentUpload filename.
Method dirname Return the NascentUpload filename.
Method exists_on_disk Whether or not the file is present on disk.
Method storeInDatabase Implement this to store this representation in the database.
Method verify Implemented locally.
Method checkNameIsTaintFree Verify if the filename contains forbidden characters.
Method checkSizeAndCheckSum Check the size and checksums of the nascent file.
def __init__(self, filepath, checksums, size, component_and_section, priority_name, policy, logger):
Undocumented
@property
def content_type(self):
The content type for this file.

Return a value ready for adding to the librarian.

@property
def filename(self):
Return the NascentUpload filename.
@property
def dirname(self):
Return the NascentUpload filename.
@property
def exists_on_disk(self):
Whether or not the file is present on disk.
def storeInDatabase(self):
Implement this to store this representation in the database.
def verify(self):
Implemented locally.

It does specific checks acording the subclass type and returns an iterator over all the encountered errors and warnings.

def checkNameIsTaintFree(self):
Verify if the filename contains forbidden characters.
def checkSizeAndCheckSum(self):
Check the size and checksums of the nascent file.

Raise UploadError if the size or checksums do not match or if the file is not found on the disk.

API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.