本文整理汇总了Python中resources.lib.FileAccess.FileAccess.copy方法的典型用法代码示例。如果您正苦于以下问题:Python FileAccess.copy方法的具体用法?Python FileAccess.copy怎么用?Python FileAccess.copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类resources.lib.FileAccess.FileAccess
的用法示例。
在下文中一共展示了FileAccess.copy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: onAction
# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import copy [as 别名]
def onAction(self, act):
action = act.getId()
if action in ACTION_PREVIOUS_MENU:
if self.showingList == False:
self.cancelChan()
self.hideChanDetails()
else:
if self.madeChanges == 1:
dlg = xbmcgui.Dialog()
if dlg.yesno("Save", "Do you want to save all changes?"):
ADDON_SETTINGS.writeSettings()
if CHANNEL_SHARING:
realloc = REAL_SETTINGS.getSetting('SettingsFolder')
FileAccess.copy(SETTINGS_LOC + '/settings2.xml', realloc + '/settings2.xml')
self.close()
elif act.getButtonCode() == 61575: # Delete button
curchan = self.listcontrol.getSelectedPosition() + 1
if( (self.showingList == True) and (ADDON_SETTINGS.getSetting("Channel_" + str(curchan) + "_type") != "9999") ):
dlg = xbmcgui.Dialog()
if dlg.yesno("Save", "Are you sure you want to clear this channel?"):
ADDON_SETTINGS.setSetting("Channel_" + str(curchan) + "_type", "9999")
self.updateListing(curchan)
self.madeChanges = 1
示例2: onAction
# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import copy [as 别名]
def onAction(self, act):
action = act.getId()
if action in ACTION_PREVIOUS_MENU:
if self.showingList == False:
self.cancelChan()
self.hideChanDetails()
else:
if self.madeChanges == 1:
dlg = xbmcgui.Dialog()
if dlg.yesno(xbmc.getLocalizedString(190), REAL_SETTINGS.getLocalizedString(30032)):
ADDON_SETTINGS.writeSettings()
if CHANNEL_SHARING:
realloc = REAL_SETTINGS.getSetting("SettingsFolder")
FileAccess.copy(SETTINGS_LOC + "/settings2.xml", realloc + "/settings2.xml")
self.close()
elif act.getButtonCode() == 61575: # Delete button
curchan = self.listcontrol.getSelectedPosition() + 1
if (self.showingList == True) and (
ADDON_SETTINGS.getSetting("Channel_" + str(curchan) + "_type") != "9999"
):
dlg = xbmcgui.Dialog()
if dlg.yesno(xbmc.getLocalizedString(190), REAL_SETTINGS.getLocalizedString(30033)):
ADDON_SETTINGS.setSetting("Channel_" + str(curchan) + "_type", "9999")
self.updateListing(curchan)
self.madeChanges = 1
示例3: __init__
# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import copy [as 别名]
def __init__(self, *args, **kwargs):
self.log("__init__")
if xbmcgui.Window(10000).getProperty("PseudoTVRunning") != "True":
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
self.madeChanges = 0
self.showingList = True
self.channel = 0
self.channel_type = 9999
self.setting1 = ''
self.setting2 = ''
self.setting3 = ''
self.setting4 = ''
self.savedRules = False
self.DirName = ''
self.PluginSourcePathDir = ''
self.LockBrowse = False
self.chnlst = ChannelList()
if CHANNEL_SHARING:
realloc = REAL_SETTINGS.getSetting('SettingsFolder')
FileAccess.copy(realloc + '/settings2.xml', SETTINGS_LOC + '/settings2.xml')
ADDON_SETTINGS.loadSettings()
ADDON_SETTINGS.disableWriteOnSave()
self.doModal()
self.log("__init__ return")
else:
xbmc.executebuiltin("Notification( %s, %s, %d, %s)" % ("PseudoTV Lite", "Not available while running.", 4000, THUMB) )
示例4: __init__
# 需要导入模块: from resources.lib.FileAccess import FileAccess [as 别名]
# 或者: from resources.lib.FileAccess.FileAccess import copy [as 别名]
def __init__(self, *args, **kwargs):
self.log("__init__")
xbmcgui.WindowXMLDialog.__init__(self, *args, **kwargs)
self.madeChanges = 0
self.showingList = True
self.channel = 0
self.channel_type = 9999
self.setting1 = ""
self.setting2 = ""
self.savedRules = False
if CHANNEL_SHARING:
realloc = REAL_SETTINGS.getSetting("SettingsFolder")
FileAccess.copy(realloc + "/settings2.xml", SETTINGS_LOC + "/settings2.xml")
ADDON_SETTINGS.loadSettings()
ADDON_SETTINGS.disableWriteOnSave()
self.doModal()
self.log("__init__ return")