smartFolder(智慧型資料夾)
透過 eagle.smartFolder API 可以方便的建立、查詢、修改及刪除智慧型資料夾。
// 使用流暢建構器建立智慧型資料夾
const sf = await eagle.smartFolder.create({
name: '大尺寸 PNG',
conditions: [
eagle.smartFolder.Condition.create('AND', [
eagle.smartFolder.rule('width')['>']([1920]),
eagle.smartFolder.rule('type').equal('png'),
])
]
});
// 修改屬性
sf.name = '超大尺寸 PNG';
sf.iconColor = 'blue';
// 儲存修改
await sf.save();方法
create(options)
get(options)
getAll()
getById(smartFolderId)
getByIds(smartFolderIds)
remove(smartFolderId)
getRules()
rule(property)
類:SmartFolder
實例方法
save()
getItems(options)
實例屬性
id string
id stringname string
name stringconditions Object[]
conditions Object[]description string
description stringicon string
icon stringiconColor string
iconColor stringmodificationTime integer
modificationTime integerchildren SmartFolder[]
children SmartFolder[]parent string
parent stringimageCount integer
imageCount integerHelper Classes
SmartFolder.Rule
SmartFolder.Condition
靜態屬性
IconColor Object
IconColor ObjectLast updated