public class UDFS
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
UDFS.MountedFsInformationStructure
Contains information about a mounted file system.
|
class |
UDFS.UdfsInformationStructure
Contains information about a UDFS.
|
Constructor and Description |
---|
UDFS(AS400 system,
java.lang.String path)
Constructs a UDFS object.
|
Modifier and Type | Method and Description |
---|---|
void |
create()
Creates a file system that can be made visible to the rest of the integrated file system name space through the mount() method.
|
void |
create(java.lang.String publicDataAuthority,
java.lang.String[] publicObjectAuthority,
java.lang.String auditingValue,
java.lang.String scanningOption,
boolean specialRestrictions,
java.lang.String defaultDiskStorageOption,
java.lang.String defaultMainStorageOption,
java.lang.String caseSensitivity,
java.lang.String defaultFileFormat,
java.lang.String description)
Creates a file system that can be made visible to the rest of the integrated file system name space through the mount() method.
|
void |
delete()
Deletes an existing and unmounted user-defined file system (UDFS) and all of the objects within it.
|
UDFS.MountedFsInformationStructure |
getMountedFsInformationStructure()
Returns information about a mounted file system.
|
UDFS.UdfsInformationStructure |
getUdfsInformationStructure()
Returns information about a UDFS.
|
void |
mount(java.lang.String mountPoint)
Makes the objects in a file system accessible to the integrated file system name space.
|
void |
mount(java.lang.String mountPoint,
boolean rwOption,
boolean suidOption)
Makes the objects in a file system accessible to the integrated file system name space.
|
void |
setPreferredStorageUnit(java.lang.String storageUnit)
Specifies the preferred storage media of objects created in this user-defined file system.
|
void |
unmount()
Makes a previously mounted file system inaccessible within the integrated file system name space.
|
public UDFS(AS400 system, java.lang.String path)
system
- The system object representing the system on which the UDFS exists.path
- The path name of the file system. It must be in one of the following two forms:
The name part of the path must be unique within the specified qaspXX or aspname directory.
Wildcard characters such as '*' and '?' are not allowed in this parameter.
public void create() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
A UDFS is represented by the object type *BLKSF, or block special file.
The public data authority and public object authority will be *INDIR, the auditing value will be *SYSVAL, the scanning option will be *PARENT, rename and unlink will not be restricted, the default disk storage option and the default main storage option will be *NORMAL, the case sensitivity will be *MONO, the default file format will be *TYPE2, and the description will be *BLANK.
Restrictions:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.setPreferredStorageUnit(java.lang.String)
public void create(java.lang.String publicDataAuthority, java.lang.String[] publicObjectAuthority, java.lang.String auditingValue, java.lang.String scanningOption, boolean specialRestrictions, java.lang.String defaultDiskStorageOption, java.lang.String defaultMainStorageOption, java.lang.String caseSensitivity, java.lang.String defaultFileFormat, java.lang.String description) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
A UDFS is represented by the object type *BLKSF, or block special file.
Restrictions:
FileAttributes
.publicDataAuthority
- Specifies the public data authority given to the user for the new user-defined file system (UDFS), or specifies that all authorities are inherited from the directory it is to be created in. Possible values are:
publicObjectAuthority
- Specifies the public object authority given to users for the user-defined file system, or specifies that all authorities are inherited from the directory it is to be created in. Possible values for the elements of this array are:
auditingValue
- Specifies the auditing value of root directory objects created in this user-defined file system. Possible values are:
scanningOption
- Specifies whether the root directory objects created in the user-defined file system will be scanned when exit programs are registered with any of the integrated file system scan-related exit points.
The integrated file system scan-related exit points are:
For details on these exit points, see the System API Reference information in the IBM i Information Center at http://www.ibm.com/systems/i/infocenter.
Even though this attribute can be set for user-defined file systems, only objects which are in *TYPE2 directories in that user-defined file system will actually be scanned, no matter what value is set for this attribute.
Possible values are:
Note: If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
Note: If the Scan file systems control (QSCANFSCTL) value *NOPOSTRST is not specified when an object with this attribute is restored, the object will be scanned at least once after the restore.
This parameter is ignored on Version 5 Release 2 and earlier of IBM i.
specialRestrictions
- Specifies whether special restrictions apply for rename and unlink operations performed on objects within the root directory of the user-defined file system. This attribute is equivalent to the S_ISVTX mode bit for this directory. true if objects within the root directory of the user-defined file system may be renamed or unlinked only if one or more of the following are true for the user performing the operation:
false if no additional restrictions for renaming or unlinking objects from the root directory of the user-defined file system. This parameter is ignored on Version 5 Release 2 and earlier of IBM i.
defaultDiskStorageOption
- Specifies how auxiliary storage will be allocated by the system for the stream files (*STMF) created in this user-defined file system. This option will be ignored for *TYPE1 stream files. Possible values are:
This parameter is ignored on Version 5 Release 4 and earlier of IBM i.
defaultMainStorageOption
- Specifies how main storage is allocated and used by the system for the stream files (*STMF) created in this user-defined file system. Possible values are:
This parameter is ignored on Version 5 Release 4 and earlier of IBM i.
caseSensitivity
- Specifies the case sensitivity of this file system. Possible values are:
defaultFileFormat
- Specifies the format of stream files (*STMF) created in this user-defined file system. Possible values are:
description
- Text description for the user-defined file system. Possible values are:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.setPreferredStorageUnit(java.lang.String)
public void delete() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
Restrictions:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.public void mount(java.lang.String mountPoint) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
Restrictions:
mountPoint
- Specifies the path name of the existing directory that the file system will be mounted over. This directory gets 'covered' by the mounted file system. This directory must exist.
Multiple file systems can be mounted over the same directory, one on top of the other. However, only the topmost mounted file system is accessible, and the file systems must later be unmounted in the opposite order from which they were mounted (last-in first-out order).
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.public void mount(java.lang.String mountPoint, boolean rwOption, boolean suidOption) throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
Restrictions:
mountPoint
- Specifies the path name of the existing directory that the file system will be mounted over. This directory gets 'covered' by the mounted file system. This directory must exist.
Multiple file systems can be mounted over the same directory, one on top of the other. However, only the topmost mounted file system is accessible, and the file systems must later be unmounted in the opposite order from which they were mounted (last-in first-out order).
rwOption
- This option specifies the protection for the mounted file system. true if read-write, false if read-only.suidOption
- This option specifies whether setuid execution is allowed. true if suid is specified and setuid execution is allowed. This means that bits other than the permission bits may be set. false if nosuid is specified, setuid execution is not allowed. This parameter is ignored on Version 5 Release 2 and earlier of IBM i.AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.public void unmount() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException
Restrictions:
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.public UDFS.UdfsInformationStructure getUdfsInformationStructure() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist.public UDFS.MountedFsInformationStructure getMountedFsInformationStructure() throws AS400SecurityException, ErrorCompletingRequestException, java.lang.InterruptedException, java.io.IOException, ObjectDoesNotExistException
AS400SecurityException
- If a security or authority error occurs.ErrorCompletingRequestException
- If an error occurs before the request is completed.java.lang.InterruptedException
- If this thread is interrupted.java.io.IOException
- If an error occurs while communicating with the system.ObjectDoesNotExistException
- If the object does not exist.public void setPreferredStorageUnit(java.lang.String storageUnit)
create()
.
Note: This method is supported only on IBM i version 7.1 and higher. On IBM i version 7.1 it is supported only if IBM i 7.1 PTF SI39439 is installed. If *SSD is specified for a system at IBM i 7.1, and PTF SI39439 is not installed, then the create() methods will throw an AS400Exception indicating "Keyword UNIT not valid for this command".
To retrieve the in-effect value of the "preferred storage unit" attribute, call FileAttributes.getUdfsPreferredStorageUnit()
.
storageUnit
- Preferred storage unit.
Possible values are: