本文整理汇总了Python中sickbeard.helpers.moveAndSymlinkFile函数的典型用法代码示例。如果您正苦于以下问题:Python moveAndSymlinkFile函数的具体用法?Python moveAndSymlinkFile怎么用?Python moveAndSymlinkFile使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了moveAndSymlinkFile函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _int_move_and_sym_link
def _int_move_and_sym_link(cur_file_path, new_file_path):
self._log(u"Moving then symbolic linking file from " + cur_file_path + " to " + new_file_path, logger.DEBUG)
try:
helpers.moveAndSymlinkFile(cur_file_path, new_file_path)
helpers.chmodAsParent(new_file_path)
except (IOError, OSError), e:
self._log("Unable to link file " + cur_file_path + " to " + new_file_path + ": " + ex(e), logger.ERROR)
raise e
示例2: _int_move_and_sym_link
def _int_move_and_sym_link(cur_file_path, new_file_path, success_tmpl=u' %s to %s'):
try:
helpers.moveAndSymlinkFile(cur_file_path, new_file_path)
helpers.chmodAsParent(new_file_path)
self._log(u'Moved then symbolic linked file from' + (success_tmpl % (cur_file_path, new_file_path)),
logger.DEBUG)
except (IOError, OSError), e:
self._log(u'Unable to link file %s<br />.. %s' % (success_tmpl % (cur_file_path, new_file_path), str(e)), logger.ERROR)
raise e