-
Notifications
You must be signed in to change notification settings - Fork 1
Categories
Categories are meant to group similar entities together. If entities are the files of the TreeStore file system the categories are the directories. The Upmost category /Entities is always there and can't be removed but underneath it categories and subcategories may be created.
A new category may be created with the New-Item cmdlet using the parameter -ItemType Category:
PS> New-Item /Entities/example_category -ItemType Category
Name ItemType
---- --------
example_category CategoryThe output shows the name and the ItemType of the newly created category.
Categories can be renamed at any time:
PS> Rename-item /Entities/example_category -NewName changed_nameCategories can be copied with a new name or into another category
PS> Copy-Item /Entities/example_category ./Entities/other_category/changed_nameSimilar to the powershell file system provider a copy doesn't include item in the source directory. These can be included in the deletion by specifying the -Recurse parameter:
PS> Copy-Item /Entities/example_category /Entities/other_category/changed_name -RecurseThe category /Entities/other_category/changed_name contains now copies of the entities and categories of the source category. Moving the category into another category includes the entities and subcategories of a category naturally:
PS> Move-Item /Entities/example_category /Entities/other_categoryAn empty category can be removed at any time:
PS> Remove-Item /Entities/example_categoryA category which contains entities or subcategories makes powershell ask for confirmation. This can be prevented by specifying the -Recurse parameter
PS> Remove-Item /Entites/example_category -Recurse