本文整理匯總了Python中MythTV.mythproto.FileOps類的典型用法代碼示例。如果您正苦於以下問題:Python FileOps類的具體用法?Python FileOps怎麽用?Python FileOps使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了FileOps類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: getHash
def getHash(self):
"""Video.getHash() -> file hash"""
if self.host is None:
return None
be = FileOps(db=self._db)
hash = be.getHash(self.filename, 'Videos', self.host)
return hash
示例2: getRecStatus
def getRecStatus(self):
be = FileOps(db=self._db)
for prog in be._getPrograms('QUERY_GETALLPENDING', header=1):
if (prog.chanid == self.chanid) and \
(prog.starttime == self.starttime):
return prog.recstatus
return 0
示例3: downloadFrom
def downloadFrom(self, url):
if self.parent is None:
raise RuntimeError("Artwork.downloadFrom must be called from "+\
"object, not class.")
be = FileOps(self.hostname, db=self.parent._db)
be.downloadTo(url, self.imagetype, self)
示例4: exists
def exists(self):
be = FileOps(self.hostname, db = self.parent._db)
return be.fileExists(unicode(self), self.imagetype)