<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add(self, origin):
 """Add new element to fsdb. Args: Returns: String rapresenting the digest of the file """


        digest = self._calc_digest(origin)

        if self.exists(digest):
            self.logger.debug('Added File: [{0}] ( Already exists. Skipping transfer)'.format(digest))
            return digest

        absPath = self.get_file_path(digest)
        absFolderPath = os.path.dirname(absPath)

        # make all parent directories if they do not exist
        self._makedirs(absFolderPath)
        self._copy_content(origin, absPath)

        self.logger.debug('Added file: "{0}" [{1}]'.format(digest, absPath))

        return digest