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 integerヘルパークラス
SmartFolder.Rule
SmartFolder.Condition
静的プロパティ
IconColor Object
IconColor Object最終更新