com.ibm.as400.access

Class FileAttributes



  • public class FileAttributes
    extends Object
    Represents the set of file attributes that can be retrieved and set through the Qp0lGetAttr() and Qp0lSetAttr() API's. The object must exist and the caller must have authority to it. Only attributes supported by the specific file system, object type, and operating system release can be retrieved or set.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static int DIRECTORY_FORMAT_TYPE1
      Constant indicating that the directory has format type 1.
      static int DIRECTORY_FORMAT_TYPE2
      Constant indicating that the directory has format type 2.
      static int FILE_FORMAT_TYPE1
      Constant indicating that the file has format type 1.
      static int FILE_FORMAT_TYPE2
      Constant indicating that the file has format type 2.
      static int JOURNAL_AFTER_IMAGES
      Constant indicating that when journaling is active, the image of the object after a change is journaled.
      static int JOURNAL_BEFORE_IMAGES
      Constant indicating that when journaling is active, the image of the object prior to a change is journaled.
      static int JOURNAL_OPTIONAL_ENTRIES
      Constant indicating that when journaling is active, entries that are considered optional are journaled.
      static int JOURNAL_SUBTREE
      Constant indicating that this object is a directory with IFS journaling subtree semantics.
      static int LOCAL_OBJECT
      Constant indicating that the object's data is stored locally.
      static int REMOTE_OBJECT
      Constant indicating that the object's data is on a remote system.
      static int SCAN_FAILURE
      Constant indicating that the object has been scanned by a scan-related exit program, and at the time of that last scan request, the object failed the scan and the operation did not complete.
      static int SCAN_NOT_REQUIRED
      Constant indicating that the object does not require any scanning because the object is marked to not be scanned.
      static int SCAN_PENDING_CONVERSION
      Constant indicating that the object is in a file system that has not completely converted to the *TYPE2 directory format, and therefore will not be scanned until the file system is completely converted.
      static int SCAN_REQUIRED
      Constant indicating that a scan is required for the object either because it has not yet been scanned by the scan-related exit programs, or because the objects data or CCSID has been modified since it was last scanned.
      static int SCAN_SUCCESS
      Constant indicating that the object has been scanned by a scan-related exit program, and at the time of that last scan request, the object did not fail the scan.
      static int SCANNING_CHANGE_ONLY
      Constant indicating that the object will be scanned only if the object has been modified since the last time the object was scanned.
      static int SCANNING_NO
      Constant indicating that the object will not be scanned.
      static int SCANNING_YES
      Constant indicating that the object will be scanned.
      static int STORAGE_DYNAMIC
      Constant indicating that the system will dynamically determine the optimum storage allocation for the object.
      static int STORAGE_MINIMIZE
      Constant indicating that storage will be allocated to minimize the space used by the object.
      static int STORAGE_NORMAL
      Constant indicating that storage will be allocated normally.
      static int SYSTEM_USE_NETWORK_SERVER_STORAGE
      Constant indicating that the file is a network server storage space.
      static int SYSTEM_USE_NONE
      Constant indicating that the file is a generic stream file.
      static int SYSTEM_USE_VIRTUAL_VOLUME
      Constant indicating that the file is a virtual volume.
      static int UDFS_DEFAULT_TYPE1
      Constant indicating that the default file format of stream files created in the user-defined file system is format type 1.
      static int UDFS_DEFAULT_TYPE2
      Constant indicating that the default file format of stream files created in the user-defined file system is format type 2.
      static int UDFS_PREFERRED_STORAGE_UNIT_ANY
      Constant indicating that no storage media is preferred.
      static int UDFS_PREFERRED_STORAGE_UNIT_SSD
      Constant indicating that solid state drive storage media is preferred.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean containsTemporaryObjects()
      Returns whether the objects in the user-defined file system (UDFS) are temporary system objects.
      Date getAccessTime()
      Returns the time that the object's data was last accessed.
      long getAllocatedSize()
      Returns the number of bytes that have been allocated for this object.
      short getAsp()
      Returns the auxiliary storage pool in which the object is stored.
      String getAudit()
      Returns the auditing value associated with the object.
      String getAuthorizationListName()
      Returns the name of the authorization list that is used to secure the named object.
      int getCcsid()
      Returns the CCSID of the data and extended attributes of the object.
      Date getChangeTime()
      Returns the time that the object's data or attributes were last changed.
      String getCheckedOutUser()
      Returns the user who has the object checked out.
      Date getCheckOutTime()
      Returns the time the object was checked out.
      int getCodePage()
      Returns the code page derived from the coded character set identifier (CCSID) used for the data in the file or the extended attributes of the directory.
      String getCreateObjectAuditing()
      Returns the create object auditing value associated with the directory.
      int getCreateObjectScan()
      Returns whether the objects created in a directory will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
      Date getCreateTime()
      Returns the time the object was created.
      long getDataSize()
      Returns the size in bytes of the data in this object.
      int getDaysUsedCount()
      Returns the number of days an object has been used.
      int getDirectoryFormat()
      Returns the format of the specified directory object.
      int getDiskStorageOption()
      Returns how auxiliary storage is allocated by the system for the specified object.
      long getExtendedAttributeSize()
      Returns the total number of extended attribute bytes.
      int getFileFormat()
      Returns the format of the stream file.
      byte[] getFileId()
      Returns the identifier associated with the referred to object.
      Date getJounalingStartTime()
      Deprecated. 
      String getJournal()
      Returns the fully qualified integrated file system path name of the current or last journal.
      byte[] getJournalIdentifier()
      Returns the field that associates the object being journaled with an identifier that can be used on various journaling-related commands and APIs.
      int getJournalingOptions()
      Returns the current journaling options.
      Date getJournalingStartTime()
      Returns the last date and time for which the object had journaling started for it.
      Date getLastUsedDate()
      Returns the date the object was last used.
      int getLocalRemote()
      Returns whether the object is stored locally or stored on a remote system.
      int getMainStorageOption()
      Returns how main storage is allocated and used by the system for the specified object.
      Date getModifyTime()
      Returns the time that the object's data was last changed.
      String getObjectOwner()
      Returns the name of the user profile that is the owner of the object.
      String getObjectType()
      Returns the object type.
      String getPrimaryGroup()
      Returns the name of the user profile that is the primary group of the object.
      Date getResetDate()
      Returns the date the days used count was last reset to zero (0).
      int getScan()
      Returns whether the object will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
      int getScanCcsid1()
      Returns the CCSID value that the object has been scanned in if it was previously scanned in a CCSID.
      int getScanCcsid2()
      Returns the CCSID value that the object has been scanned in if it was previously scanned in a CCSID.
      int getScanStatus()
      Returns the scan status associated with this object.
      String getStartingJournalReceiverAspDevice()
      Returns the name of the ASP for the library that contains the starting journal receiver.
      String getStartingJournalReceiverForApply()
      Returns the fully qualified integrated file system path name of the starting journal receiver for apply.
      int getSystemUse()
      Returns whether the file has a special use by the system.
      int getUdfsDefaultFormat()
      Returns the default file format of stream files (*STMF) created in the user-defined file system.
      int getUdfsPreferredStorageUnit()
      Returns the preferred storage media for the objects in the UDFS.
      boolean isAllowCheckpointWrite()
      Returns whether a stream file (*STMF) can be shared with readers and writers during the save-while-active checkpoint processing.
      boolean isAllowSave()
      Returns whether the object can be saved or not.
      boolean isApplyJournaledChangesRequired()
      Returns whether the object was restored with partial transactions which would require an Apply Journaled Changes (APYJRNCHG) command to complete the transaction.
      boolean isBinaryScan()
      Returns whether the object has been scanned in binary mode when it was previously scanned.
      boolean isCheckedOut()
      Returns whether the object is checked out or not.
      boolean isInheritAllowCheckpointWrite()
      Returns whether new objects created within a directory should inherit the save-while-active checkpoint processing options of its parent.
      boolean isJournalingStatus()
      Returns whether the object is currently being journaled.
      boolean isMultipleSignatures()
      Returns whether the object has more than one IBM i digital signature.
      boolean isPcArchive()
      Returns whether the object has changed since the last time the file was examined.
      boolean isPcHidden()
      Returns whether the object can be displayed using an ordinary directory listing.
      boolean isPcReadOnly()
      Returns whether the object can be written to or deleted, have its extended attributes changed or deleted, or have its size changed.
      boolean isPcSystem()
      Returns whether the object is a system file and is excluded from normal directory searches.
      boolean isRestrictedRenameAndUnlink()
      Returns whether renames and unlinks are restricted for objects within a directory.
      boolean isRollbackWasEnded()
      Returns whether the object had rollback ended prior to completion of a request to roll back a transaction.
      boolean isScanSignaturesDifferent()
      Returns whether the scan signatures are different.
      boolean isSetEffectiveGroupId()
      Returns whether the effective group ID (GID) is set at execution time.
      boolean isSetEffectiveUserId()
      Returns whether the effective user ID (UID) is set at execution time.
      boolean isSigned()
      Returns whether the object has an IBM i digital signature.
      boolean isStorageFree()
      Returns whether the object's data has been moved offline, freeing its online storage.
      boolean isSysRestrictSave()
      Returns whether the object can be written to or deleted, have its extended attributes changed or deleted, or have its size changed.
      boolean isSystemArchive()
      Returns whether the object has changed and needs to be saved.
      boolean isSystemSigned()
      Returns whether the object was signed by a source that is trusted by the system.
      boolean isTemporaryObject()
      Returns whether the object is a temporary system object.
      void refresh()
      Refreshes the attributes from the system.
      void resetDate()
      Resets the count of the number of days an object has been used.
      void setAccessTime(Date accessTime)
      Sets the time that the object's data was last accessed.
      void setAllowCheckpointWrite(boolean allowCheckpointWrite)
      Sets whether a stream file (*STMF) can be shared with readers and writers during the save-while-active checkpoint processing.
      void setAllowSave(boolean allowSave)
      Sets whether the object can be saved or not.
      void setCcsid(int ccsid)
      Sets the CCSID of the data and extended attributes of the object.
      void setCodePage(int codePage)
      Sets the code page used to derive a coded character set identifier (CCSID) used for the data in the file or the extended attributes of the directory.
      void setCreateObjectAuditing(String createObjectAuditing)
      Sets the create object auditing value associated with the directory.
      void setCreateObjectScan(int createObjectScan)
      Sets whether the objects created in a directory will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
      void setCreateTime(Date createTime)
      Sets the time the object was created.
      void setDiskStorageOption(int diskStorageOption)
      Sets which option should be used to determine how auxiliary storage is allocated by the system for the specified object.
      void setInheritAllowCheckpointWrite(boolean inheritAllowCheckpointWrite)
      Sets whether new objects created within a directory should inherit the save-while-active checkpoint processing options of its parent.
      void setMainStorageOption(int mainStorageOption)
      Sets which option should be used to determine how main storage is allocated and used by the system for the specified object.
      void setModifyTime(Date modifyTime)
      Sets the time that the object's data was last changed.
      void setPcArchive(boolean pcArchive)
      Sets whether the object has changed since the last time the file was saved or reset by a PC client.
      void setPcHidden(boolean pcHidden)
      Sets the whether the object can be displayed using an ordinary directory listing.
      void setPcReadOnly(boolean pcReadOnly)
      Sets whether the object can be written to or deleted, have its extended attributes changed or deleted, or have its size changed.
      void setPcSystem(boolean pcSystem)
      Sets whether the object is a system file and is excluded from normal directory searches.
      void setRestrictedRenameAndUnlink(boolean restrictedRenameAndUnlink)
      Sets whether renames and unlinks are restricted for objects within a directory.
      void setScan(int scan)
      Sets the whether the object will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
      void setSetEffectiveGroupId(boolean setEffectiveGroupId)
      Sets whether the effective group ID (GID) is set at execution time.
      void setSetEffectiveUserId(boolean setEffectiveUserId)
      Sets whether the effective user ID (UID) is set at execution time.
      void setSystemArchive(boolean systemArchive)
      Sets whether the object has changed and needs to be saved.