How to use the ratarmount.SQLiteIndexedTar function in ratarmount

To help you get started, we’ve selected a few ratarmount examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mxmlnkn / ratarmount / ratarmount.py View on Github external
def _getFileInfoFromRealFile( filePath ):
        stats = os.lstat( filePath )
        return SQLiteIndexedTar.FileInfo(
            offset       = None          ,
            offsetheader = None          ,
            size         = stats.st_size ,
            mtime        = stats.st_mtime,
            mode         = stats.st_mode ,
            type         = None          , # I think this is completely unused and mostly contained in mode
            linkname     = os.readlink( filePath ) if os.path.islink( filePath ) else None,
            uid          = stats.st_uid  ,
            gid          = stats.st_gid  ,
            istar        = False         ,
            issparse     = False
        )
github mxmlnkn / ratarmount / ratarmount.py View on Github external
def _openTar( self, tarFilePath, clearIndexCache, recursive, gzipSeekPointSpacing ):
        return SQLiteIndexedTar( tarFilePath,
                                 writeIndex           = True,
                                 clearIndexCache      = clearIndexCache,
                                 recursive            = recursive,
                                 gzipSeekPointSpacing = gzipSeekPointSpacing  )