当前位置: 首页>>代码示例>>Python>>正文


Python FileAccess.copy方法代码示例

本文整理汇总了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
开发者ID:yolanother,项目名称:script.pseudotv.live,代码行数:31,代码来源:config.py

示例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
开发者ID:rafaelvieiras,项目名称:script.pseudotv,代码行数:33,代码来源:config.py

示例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) )
开发者ID:halcyonforever,项目名称:XBMC_Addons,代码行数:29,代码来源:config.py

示例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")
开发者ID:rafaelvieiras,项目名称:script.pseudotv,代码行数:21,代码来源:config.py


注:本文中的resources.lib.FileAccess.FileAccess.copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。