filePermissions (property)

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

Syntax

- (NSString*)filePermissions:(int)fileIndex;
- (void)setFilePermissions:(int)fileIndex:(NSString*)newFilePermissions;
public func filePermissions(fileIndex: Int32) throws -> String
public func setFilePermissions(fileIndex: Int32, newFilePermissions: String) throws -> Void

Default Value

"644"

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 FileIndex parameter specifies the index of the item in the array. The size of the array is controlled by the FileCount property.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks ZIP 2020 iOS Edition - Version 20.0 [Build 8300]