本文整理汇总了Python中FileUtils.activateSmartCheckIcon方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtils.activateSmartCheckIcon方法的具体用法?Python FileUtils.activateSmartCheckIcon怎么用?Python FileUtils.activateSmartCheckIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileUtils
的用法示例。
在下文中一共展示了FileUtils.activateSmartCheckIcon方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: emendDirectoryWithContents
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import activateSmartCheckIcon [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()
示例2: clearEmptyDirectories
# 需要导入模块: import FileUtils [as 别名]
# 或者: from FileUtils import activateSmartCheckIcon [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()