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


Python FileUtils.completeSmartCheckIcon方法代码示例

本文整理汇总了Python中FileUtils.completeSmartCheckIcon方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtils.completeSmartCheckIcon方法的具体用法?Python FileUtils.completeSmartCheckIcon怎么用?Python FileUtils.completeSmartCheckIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FileUtils的用法示例。


在下文中一共展示了FileUtils.completeSmartCheckIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: emendDirectoryWithContents

# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import completeSmartCheckIcon [as 别名]
 def emendDirectoryWithContents(self):
     try:
         _path = self.checkSource(str(QuickMakeParameters[1]), "directory")
         if _path is not None:
             if uni.getBoolValue("isShowQuickMakeWindow"):
                 newEmendedName = str(self.leNewValue.text())
             else:
                 newEmendedName = Organizer.emend(_path, fu.getObjectType(_path))
             fu.activateSmartCheckIcon()
             oldFileName = _path
             newDirName = fu.moveOrChange(oldFileName, newEmendedName, "directory")
             if newDirName != oldFileName:
                 fileAndDirectoryNames = fu.readDirectory(newDirName, "fileAndDirectory")
                 for fileAndDirs in fileAndDirectoryNames:
                     objectType = fu.getObjectType(fu.joinPath(newDirName, fileAndDirs))
                     fu.moveOrChange(fu.joinPath(newDirName, fileAndDirs),
                                     fu.joinPath(newDirName, Organizer.emend(fileAndDirs, objectType)), objectType)
                 if uni.isActiveDirectoryCover and uni.getBoolValue(
                     "isActiveAutoMakeIconToDirectory") and uni.getBoolValue(
                     "isAutoMakeIconToDirectoryWhenFileMove"):
                     fu.checkIcon(newDirName)
                 if fu.isDir(newDirName):
                     fu.completeSmartCheckIcon()
                 Dialogs.show(translate("QuickMake", "Directory And Contents Emended"),
                              str(translate("QuickMake",
                                            "\"%s\" is emended based on the criteria you set.This directory is \"%s\" now.")) %
                              (Organizer.getLink(_path), Organizer.getLink(newDirName)))
         self.close()
     except:
         ReportBug.ReportBug()
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:32,代码来源:QuickMake.py

示例2: clearEmptyDirectories

# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import completeSmartCheckIcon [as 别名]
 def clearEmptyDirectories(self):
     try:
         _path = self.checkSource(str(QuickMakeParameters[1]), "directory")
         if _path is not None:
             if fu.isWritableFileOrDir(_path):
                 fu.activateSmartCheckIcon()
                 fu.checkEmptyDirectories(_path, True, True, True, True)
                 if fu.isDir(_path):
                     fu.completeSmartCheckIcon()
                 Dialogs.show(translate("QuickMake", "Directory Cleaned"),
                              str(translate("QuickMake",
                                            "\"%s\" is cleaned based on the criteria you set.")) % Organizer.getLink(
                                  _path))
         self.close()
     except:
         ReportBug.ReportBug()
开发者ID:supermurat,项目名称:hamsi-manager,代码行数:18,代码来源:QuickMake.py


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