FilePermissions Property

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

Syntax

ANSI (Cross Platform)
char* GetFilePermissions(int iFileIndex);
int SetFilePermissions(int iFileIndex, const char* lpszFilePermissions); Unicode (Windows) LPWSTR GetFilePermissions(INT iFileIndex);
INT SetFilePermissions(INT iFileIndex, LPCWSTR lpszFilePermissions);
- (NSString*)filePermissions:(int)fileIndex;
- (void)setFilePermissions:(int)fileIndex:(NSString*)newFilePermissions;
#define PID_TAR_FILEPERMISSIONS 12

IPWORKSZIP_EXTERNAL void* IPWORKSZIP_CALL IPWorksZip_Tar_Get(void *lpObj, int propid, int arridx, int *lpcbVal, int64 *lpllVal);
IPWORKSZIP_EXTERNAL int IPWORKSZIP_CALL IPWorksZip_Tar_Set(void *lpObj, int propid, int arridx, const void *val, int cbVal);
IPWORKSZIP_EXTERNAL int IPWORKSZIP_CALL IPWorksZip_Tar_CheckIndex(void *lpObj, int propid, int arridx);

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.

This property is not available at design time.

Data Type

String

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