Folder Events

EventNames:

  • AddFolder_Restrictions

  • AddFolder_Pre

  • AddFolder_Post

Parameters

Type

Name

Description

Folder

folder

The folder which should get / is added.

Restrictions and Pre:
In Restrictions and Pre you have the very limited data set on this object like _NewName and _NewLibrary.

Post:
In POST its an usual powerVaultFolder object, because at this point the folder exists.

Folder

parentFolder

The parent folder where the new folder will be / is added.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
AddFolder_Restrictions:

Register-VaultEvent -EventName AddFolder_Restrictions -Action 'RestrictAddFolder'

function RestrictAddFolder($folder, $parentFolder) {
	#Write event code here
}

AddFolder_Pre:

Register-VaultEvent -EventName AddFolder_Pre -Action 'PreAddFolder'

function PreAddFolder($folder, $parentFolder) {
	#Write event code here
}

AddFolder_Post:

Register-VaultEvent -EventName AddFolder_Post -Action 'PostAddFolder'

function PostAddFolder($folder, $parentFolder, $successful) {
	#Write event code here
}

EventNames:

  • MoveFolder_Restrictions

  • MoveFolder_Pre

  • MoveFolder_Post

Parameters

Type

Name

Description

Folder

folder

The folder which should get / is moved.

Restrictions and Pre:
In Restrictions and Pre you have the future data set on this object like _NewFullPath.

Post:
In POST you can retrieve the previous information by using the properties _OldFullPath.

Folder

parentFolder

The new parent folder where the folder should / is moved

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
MoveFolder_Restrictions:

Register-VaultEvent -EventName MoveFolder_Restrictions -Action 'RestrictMoveFolder'

function RestrictMoveFolder($folder, $parentFolder) {
	#Write event code here
}

MoveFolder_Pre:

Register-VaultEvent -EventName MoveFolder_Pre -Action 'PreMoveFolder'

function PreMoveFolder($folder, $parentFolder) {
	#Write event code here
}

MoveFolder_Post:

Register-VaultEvent -EventName MoveFolder_Post -Action 'PostMoveFolder'

function PostMoveFolder($folder, $parentFolder, $successful) {
	#Write event code here
}

EventNames:

  • DeleteFolder_Restrictions

  • DeleteFolder_Pre

  • DeleteFolder_Post

Parameters

Type

Name

Description

Folder

folder (deletedFolder in POST)

The folder which should get / is deleted.

bool

successful

Post:
The information whether the Web Service call was successful or not is only available in Post events.

Examples:
DeleteFolder_Restrictions:

Register-VaultEvent -EventName DeleteFolder_Restrictions -Action 'RestrictDeleteFolder'

function RestrictDeleteFolder($folder) {
	#Write event code here
}

DeleteFolder_Pre:

Register-VaultEvent -EventName DeleteFolder_Pre -Action 'PreDeleteFolder'

function PreDeleteFolder($folder) {
	#Write event code here
}

DeleteFolder_Post:

Register-VaultEvent -EventName DeleteFolder_Post -Action 'PostDeleteFolder'

function PostDeleteFolder($deletedFolder, $successful) {
	#Write event code here
}