5.1 Lock/Unlock File
Last updated
Was this helpful?
Last updated
Was this helpful?
The lockFile
function of BayunCore
class locks a file with default encryption-policy dictated by server settings.
The function takes the following parameters :
sessionId : Unique SessionId which is received in the authenticate function response.
filePath : File path to be locked.
The file at the given file path is overwritten with the locked file. If file locking fails original file is not changed.
The lockFile
function with encryption-policy as an optional parameter locks file with the encryption key dictated by the policy. The function takes the following parameters :
sessionId : Unique SessionId which is received in the authenticate function response.
filePath : File path to be locked.
encryptionPolicy : determines the key for locking.
keyGenerationPolicy : determines the policy to generate the data encryption key.
groupId : GroupId is required if encryptionPolicy is BayunEncryptionPolicyGroup
.
The unlockFile
function of BayunCore
class unlocks a locked file. The function takes the following parameters :
sessionId : Unique SessionId which is received in the authenticate function response.
filePath : File path to be unlocked.
The file at the given file path is overwritten with the unlocked file.