IP*Works! ZIP V9 - Online Help
IP*Works! ZIP V9
Questions / Feedback?

FilePermissions Property

This property contains the UNIX permissions of the file, as stored in the tar archive.

Syntax

 tar.getFilePermissions(index, [callback])
 tar.setFilePermissions(index,  filePermissions, [callback])

Default Value

"644"


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getFilePermissions([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setFilePermissions([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

This property contains the UNIX permissions of the file, as stored in the tar archive. It will be written to the tar archive during compression. As native code is not used, permissions are read from and written to the tar archive only, and not to the file system.

The value should be specified as a string of three characters, representing the owner's permissions, the group's permissions, and others' permissions. Each character should be a bitmask of 4 (read access), 2 (write access), or 1 (executable access), as in chmod.

In Java, if the SetFilePermissions configuration setting is set to true, the class will shell out an instance of chmod for each file, and will attempt to set the file permissions to those specified in FilePermissions. Obviously, this functionality is operating system dependent and will fail in Windows in particular; it may also fail in other operating systems for a variety of reasons.

The size of the array is controlled by the FileCount property.

This property is not available at design time.

Data Type

String

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 9.0.6240.0