A service for manipulating files and filerefs in a SAS Workspace.
This component provides access to the files and filerefs that are accessible to a SAS Workspace. Each workspace has a single file service, which can be found in its FileService attribute.
The FileService and the related Fileref, FileInfo, BinaryStream and TextStream interfaces are implemented by the underlying Multi-Vendor Architecture of SAS so that the same interfaces can be supported on different host platforms. If you avoid host-specific assumptions in your code, you can write client applications that will operate correctly across different types of host filesystems.
While you can list and manage files and filerefs through this interface, you use the Fileref interface to read or write the data itself. Furthermore, there are no interfaces that manipulate physical files directly. In order to read from or write to a file, you must first create a fileref.
Users of the FileService should be familiar with SAS files and filerefs. Note that an "Access Method" and a "Device" are synonymous; the FileService uses the term "Access Method."
CORBA Definitions | |
enum ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
enum AssignmentContext | Indicates how a fileref assignment was made. |
enum TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
enum ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
enum ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
attribute Parent | The workspace containing this file service. |
method ListFiles | Lists all files in a directory. |
method DeleteFile | Deletes a file or directory. |
method MakeDirectory | Creates a new directory. |
method RenameFile | Renames an existing file or directory. |
method FullName | Returns the full pathname given a file name and directory name. |
method SplitName | Breaks a pathname into a directory and member. Useful for creating a libname. |
method ListFilerefs | Returns a list of all assigned filerefs on the current SAS Workspace. |
method AssignFileref | Assign a SAS fileref. |
method DeassignFileref | Deassigns a fileref. |
method UseFileref | Obtains the fileref component for the specified fileref name. |
Java Classes | |
IFileServiceHelper | Used to manipulate the IFileService type |
IFileServiceHolder | Used to process the IFileService type as an out parameter |
ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
ListFilesModeHelper | Used to manipulate the ListFilesMode type |
ListFilesModeHolder | Used to process the ListFilesMode type as an out parameter |
ListFilesModeSeqHelper | Used to manipulate one dimensional arrays of the ListFilesMode type |
ListFilesModeSeqHolder | Used to process one dimensional arrays of the ListFilesMode type as an out parameter |
VariableArray2dOfListFilesModeHelper | Used to manipulate two dimensional arrays of the ListFilesMode type |
VariableArray2dOfListFilesModeHolder | Used to process two dimensional arrays of the ListFilesMode type |
AssignmentContext | Indicates how a fileref assignment was made. |
AssignmentContextHelper | Used to manipulate the AssignmentContext type |
AssignmentContextHolder | Used to process the AssignmentContext type as an out parameter |
AssignmentContextSeqHelper | Used to manipulate one dimensional arrays of the AssignmentContext type |
AssignmentContextSeqHolder | Used to process one dimensional arrays of the AssignmentContext type as an out parameter |
VariableArray2dOfAssignmentContextHelper | Used to manipulate two dimensional arrays of the AssignmentContext type |
VariableArray2dOfAssignmentContextHolder | Used to process two dimensional arrays of the AssignmentContext type |
TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
TypeCategoryHelper | Used to manipulate the TypeCategory type |
TypeCategoryHolder | Used to process the TypeCategory type as an out parameter |
TypeCategorySeqHelper | Used to manipulate one dimensional arrays of the TypeCategory type |
TypeCategorySeqHolder | Used to process one dimensional arrays of the TypeCategory type as an out parameter |
VariableArray2dOfTypeCategoryHelper | Used to manipulate two dimensional arrays of the TypeCategory type |
VariableArray2dOfTypeCategoryHolder | Used to process two dimensional arrays of the TypeCategory type |
ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
ListFilesIndexHelper | Used to manipulate the ListFilesIndex type |
ListFilesIndexHolder | Used to process the ListFilesIndex type as an out parameter |
ListFilesIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilesIndex type |
ListFilesIndexSeqHolder | Used to process one dimensional arrays of the ListFilesIndex type as an out parameter |
VariableArray2dOfListFilesIndexHelper | Used to manipulate two dimensional arrays of the ListFilesIndex type |
VariableArray2dOfListFilesIndexHolder | Used to process two dimensional arrays of the ListFilesIndex type |
ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
ListFilerefsIndexHelper | Used to manipulate the ListFilerefsIndex type |
ListFilerefsIndexHolder | Used to process the ListFilerefsIndex type as an out parameter |
ListFilerefsIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilerefsIndex type |
ListFilerefsIndexSeqHolder | Used to process one dimensional arrays of the ListFilerefsIndex type as an out parameter |
VariableArray2dOfListFilerefsIndexHelper | Used to manipulate two dimensional arrays of the ListFilerefsIndex type |
VariableArray2dOfListFilerefsIndexHolder | Used to process two dimensional arrays of the ListFilerefsIndex type |
Java Interfaces | |
IFileService | A service for manipulating files and filerefs in a SAS Workspace. |
CORBA Definitions | |
enum ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
enum AssignmentContext | Indicates how a fileref assignment was made. |
enum TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
enum ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
enum ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
attribute Parent | The workspace containing this file service. |
method ListFiles | Lists all files in a directory. |
method DeleteFile | Deletes a file or directory. |
method MakeDirectory | Creates a new directory. |
method RenameFile | Renames an existing file or directory. |
method FullName | Returns the full pathname given a file name and directory name. |
method SplitName | Breaks a pathname into a directory and member. Useful for creating a libname. |
method ListFilerefs | Returns a list of all assigned filerefs on the current SAS Workspace. |
method AssignFileref | Assign a SAS fileref. |
method DeassignFileref | Deassigns a fileref. |
method UseFileref | Obtains the fileref component for the specified fileref name. |
exception DeviceNotMounted | Indicates that the specified device is not available for access. |
method ListFiles_2 | Lists all files in a directory. |
Java Classes | |
IFileService_1_1Helper | Used to manipulate the IFileService_1_1 type |
IFileService_1_1Holder | Used to process the IFileService_1_1 type as an out parameter |
ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
ListFilesModeHelper | Used to manipulate the ListFilesMode type |
ListFilesModeHolder | Used to process the ListFilesMode type as an out parameter |
ListFilesModeSeqHelper | Used to manipulate one dimensional arrays of the ListFilesMode type |
ListFilesModeSeqHolder | Used to process one dimensional arrays of the ListFilesMode type as an out parameter |
VariableArray2dOfListFilesModeHelper | Used to manipulate two dimensional arrays of the ListFilesMode type |
VariableArray2dOfListFilesModeHolder | Used to process two dimensional arrays of the ListFilesMode type |
AssignmentContext | Indicates how a fileref assignment was made. |
AssignmentContextHelper | Used to manipulate the AssignmentContext type |
AssignmentContextHolder | Used to process the AssignmentContext type as an out parameter |
AssignmentContextSeqHelper | Used to manipulate one dimensional arrays of the AssignmentContext type |
AssignmentContextSeqHolder | Used to process one dimensional arrays of the AssignmentContext type as an out parameter |
VariableArray2dOfAssignmentContextHelper | Used to manipulate two dimensional arrays of the AssignmentContext type |
VariableArray2dOfAssignmentContextHolder | Used to process two dimensional arrays of the AssignmentContext type |
TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
TypeCategoryHelper | Used to manipulate the TypeCategory type |
TypeCategoryHolder | Used to process the TypeCategory type as an out parameter |
TypeCategorySeqHelper | Used to manipulate one dimensional arrays of the TypeCategory type |
TypeCategorySeqHolder | Used to process one dimensional arrays of the TypeCategory type as an out parameter |
VariableArray2dOfTypeCategoryHelper | Used to manipulate two dimensional arrays of the TypeCategory type |
VariableArray2dOfTypeCategoryHolder | Used to process two dimensional arrays of the TypeCategory type |
ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
ListFilesIndexHelper | Used to manipulate the ListFilesIndex type |
ListFilesIndexHolder | Used to process the ListFilesIndex type as an out parameter |
ListFilesIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilesIndex type |
ListFilesIndexSeqHolder | Used to process one dimensional arrays of the ListFilesIndex type as an out parameter |
VariableArray2dOfListFilesIndexHelper | Used to manipulate two dimensional arrays of the ListFilesIndex type |
VariableArray2dOfListFilesIndexHolder | Used to process two dimensional arrays of the ListFilesIndex type |
ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
ListFilerefsIndexHelper | Used to manipulate the ListFilerefsIndex type |
ListFilerefsIndexHolder | Used to process the ListFilerefsIndex type as an out parameter |
ListFilerefsIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilerefsIndex type |
ListFilerefsIndexSeqHolder | Used to process one dimensional arrays of the ListFilerefsIndex type as an out parameter |
VariableArray2dOfListFilerefsIndexHelper | Used to manipulate two dimensional arrays of the ListFilerefsIndex type |
VariableArray2dOfListFilerefsIndexHolder | Used to process two dimensional arrays of the ListFilerefsIndex type |
DeviceNotMounted | Indicates that the specified device is not available for access. |
DeviceNotMountedHelper | Used to manipulate the DeviceNotMounted type |
DeviceNotMountedHolder | Used to process the DeviceNotMounted type as an out parameter |
Java Interfaces | |
IFileService_1_1 | A service for manipulating files and filerefs in a SAS Workspace. |
CORBA Definitions | |
enum ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
enum AssignmentContext | Indicates how a fileref assignment was made. |
enum TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
enum ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
enum ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
attribute Parent | The workspace containing this file service. |
method ListFiles | Lists all files in a directory. |
method DeleteFile | Deletes a file or directory. |
method MakeDirectory | Creates a new directory. |
method RenameFile | Renames an existing file or directory. |
method FullName | Returns the full pathname given a file name and directory name. |
method SplitName | Breaks a pathname into a directory and member. Useful for creating a libname. |
method ListFilerefs | Returns a list of all assigned filerefs on the current SAS Workspace. |
method AssignFileref | Assign a SAS fileref. |
method DeassignFileref | Deassigns a fileref. |
method UseFileref | Obtains the fileref component for the specified fileref name. |
exception DeviceNotMounted | Indicates that the specified device is not available for access. |
method ListFiles_2 | Lists all files in a directory. |
exception InvalidFieldMode | |
method ListFiles_3 | Lists all files in a directory. |
Java Classes | |
IFileService_1_2Helper | Used to manipulate the IFileService_1_2 type |
IFileService_1_2Holder | Used to process the IFileService_1_2 type as an out parameter |
ListFilesMode | Indicates the type of directory list to be performed by the ListFiles operation. |
ListFilesModeHelper | Used to manipulate the ListFilesMode type |
ListFilesModeHolder | Used to process the ListFilesMode type as an out parameter |
ListFilesModeSeqHelper | Used to manipulate one dimensional arrays of the ListFilesMode type |
ListFilesModeSeqHolder | Used to process one dimensional arrays of the ListFilesMode type as an out parameter |
VariableArray2dOfListFilesModeHelper | Used to manipulate two dimensional arrays of the ListFilesMode type |
VariableArray2dOfListFilesModeHolder | Used to process two dimensional arrays of the ListFilesMode type |
AssignmentContext | Indicates how a fileref assignment was made. |
AssignmentContextHelper | Used to manipulate the AssignmentContext type |
AssignmentContextHolder | Used to process the AssignmentContext type as an out parameter |
AssignmentContextSeqHelper | Used to manipulate one dimensional arrays of the AssignmentContext type |
AssignmentContextSeqHolder | Used to process one dimensional arrays of the AssignmentContext type as an out parameter |
VariableArray2dOfAssignmentContextHelper | Used to manipulate two dimensional arrays of the AssignmentContext type |
VariableArray2dOfAssignmentContextHolder | Used to process two dimensional arrays of the AssignmentContext type |
TypeCategory | Describes how to interpret the type name that is returned by the ListFiles operation. |
TypeCategoryHelper | Used to manipulate the TypeCategory type |
TypeCategoryHolder | Used to process the TypeCategory type as an out parameter |
TypeCategorySeqHelper | Used to manipulate one dimensional arrays of the TypeCategory type |
TypeCategorySeqHolder | Used to process one dimensional arrays of the TypeCategory type as an out parameter |
VariableArray2dOfTypeCategoryHelper | Used to manipulate two dimensional arrays of the TypeCategory type |
VariableArray2dOfTypeCategoryHolder | Used to process two dimensional arrays of the TypeCategory type |
ListFilesIndex | Indices to the fieldInclusionMask array parameter of the ListFiles operation. |
ListFilesIndexHelper | Used to manipulate the ListFilesIndex type |
ListFilesIndexHolder | Used to process the ListFilesIndex type as an out parameter |
ListFilesIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilesIndex type |
ListFilesIndexSeqHolder | Used to process one dimensional arrays of the ListFilesIndex type as an out parameter |
VariableArray2dOfListFilesIndexHelper | Used to manipulate two dimensional arrays of the ListFilesIndex type |
VariableArray2dOfListFilesIndexHolder | Used to process two dimensional arrays of the ListFilesIndex type |
ListFilerefsIndex | Indices to the fieldInclusionMask array parameter to the ListFileref operation. |
ListFilerefsIndexHelper | Used to manipulate the ListFilerefsIndex type |
ListFilerefsIndexHolder | Used to process the ListFilerefsIndex type as an out parameter |
ListFilerefsIndexSeqHelper | Used to manipulate one dimensional arrays of the ListFilerefsIndex type |
ListFilerefsIndexSeqHolder | Used to process one dimensional arrays of the ListFilerefsIndex type as an out parameter |
VariableArray2dOfListFilerefsIndexHelper | Used to manipulate two dimensional arrays of the ListFilerefsIndex type |
VariableArray2dOfListFilerefsIndexHolder | Used to process two dimensional arrays of the ListFilerefsIndex type |
DeviceNotMounted | Indicates that the specified device is not available for access. |
DeviceNotMountedHelper | Used to manipulate the DeviceNotMounted type |
DeviceNotMountedHolder | Used to process the DeviceNotMounted type as an out parameter |
InvalidFieldMode | |
InvalidFieldModeHelper | Used to manipulate the InvalidFieldMode type |
InvalidFieldModeHolder | Used to process the InvalidFieldMode type as an out parameter |
Java Interfaces | |
IFileService_1_2 | A service for manipulating files and filerefs in a SAS Workspace. |
Java Interface IFileService |
A service for manipulating files and filerefs in a SAS Workspace.
IFileService Description
This component provides access to the files and filerefs
that are accessible to a SAS Workspace.
Each workspace has a single file service, which can be
found in its FileService attribute.
The FileService and the related Fileref, FileInfo, BinaryStream and TextStream interfaces are implemented by the underlying Multi-Vendor Architecture of SAS so that the same interfaces can be supported on different host platforms. If you avoid host-specific assumptions in your code, you can write client applications that will operate correctly across different types of host filesystems.
While you can list and manage files and filerefs through this interface, you use the Fileref interface to read or write the data itself. Furthermore, there are no interfaces that manipulate physical files directly. In order to read from or write to a file, you must first create a fileref.
Users of the FileService should be familiar with SAS files and filerefs. Note that an "Access Method" and a "Device" are synonymous; the FileService uses the term "Access Method."
public interface IFileService
extends org.omg.CORBA.Object
Method Summary
void | ListFiles
(
java.lang.String path ,
ListFilesMode mode ,
boolean[] fieldInclusionMask ,
org.omg.CORBA.StringHolder listedPath ,
StringSeqHolder names ,
StringSeqHolder typenames ,
TypeCategorySeqHolder typeCategories ,
IntSeqHolder sizes ,
DateTimeSeqHolder modtimes ,
StringSeqHolder engines
)
throws ( InvalidFieldMask, GenericError ); Lists all files in a directory. |
void | DeleteFile
(
java.lang.String path
)
throws ( GenericError ); Deletes a file or directory. |
java.lang.String | MakeDirectory
(
java.lang.String parentDirectory ,
java.lang.String directoryName
)
throws ( GenericError ); Creates a new directory. |
void | RenameFile
(
java.lang.String oldPath ,
java.lang.String newPath
)
throws ( GenericError ); Renames an existing file or directory. |
java.lang.String | FullName
(
java.lang.String shortName ,
java.lang.String parentName
)
throws ( GenericError ); Returns the full pathname given a file name and directory name. |
void | SplitName
(
java.lang.String path ,
org.omg.CORBA.StringHolder shortName ,
org.omg.CORBA.StringHolder parentName
)
throws ( GenericError ); Breaks a pathname into a directory and member. Useful for creating a libname. |
void | ListFilerefs
(
boolean[] fieldInclusionMask ,
StringSeqHolder names ,
AssignmentContextSeqHolder assignmentContexts ,
StringSeqHolder paths ,
StringSeqHolder accessMethods
)
throws ( InvalidFieldMask, GenericError ); Returns a list of all assigned filerefs on the current SAS Workspace. |
IFileref | AssignFileref
(
java.lang.String requestedName ,
java.lang.String accessMethodOrDevice ,
java.lang.String externalFile ,
java.lang.String hostOptions ,
org.omg.CORBA.StringHolder assignedName
)
throws ( GenericError ); Assign a SAS fileref. |
void | DeassignFileref
(
java.lang.String name
)
throws ( GenericError ); Deassigns a fileref. |
IFileref | UseFileref
(
java.lang.String name
)
throws ( GenericError ); Obtains the fileref component for the specified fileref name. |
Java Class IFileServiceHelper |
public class IFileServiceHelper
Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the
IFileService type.
java.lang.Object | +--com.sas.iom.SAS.IFileServiceHelper
Java Class IFileServiceHolder |
public class IFileServiceHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
IFileService type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileServiceHolder
CORBA Enum ListFilesMode |
Indicates the type of directory list to be performed by the ListFiles operation.
Description
This enumeration
indicates the type of directory list to be performed by
the ListFiles operation.
It determines whether or not the ListFiles::path parameter
is used and how it is interpreted.
Usage
Member | Description |
---|---|
ListFilesModeRoot | The ListFiles operation will list the host-specific system root directory. The ListFiles::path parameter is ignored. |
ListFilesModeUser | The ListFiles operation will list the host-specific user home directory. The ListFiles::path parameter is ignored. |
ListFilesModePath | The ListFiles operation will list the directory specified in the path parameter. |
ListFilesModeParentOfPath | The ListFiles operation will list the directory that is the parent of the directory specified in path. |
Java Class ListFilesMode |
public class ListFilesMode
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesMode
Java Class ListFilesModeHelper |
public class ListFilesModeHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
ListFilesMode type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesModeHelper
Java Class ListFilesModeHolder |
public class ListFilesModeHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
ListFilesMode type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesModeHolder
Java Class ListFilesModeSeqHelper |
public class ListFilesModeSeqHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of
ListFilesMode type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesModeSeqHelper
Java Class ListFilesModeSeqHolder |
public class ListFilesModeSeqHolder
Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the
ListFilesMode type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesModeSeqHolder
Java Class VariableArray2dOfListFilesModeHelper |
public class VariableArray2dOfListFilesModeHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of
ListFilesMode type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilesModeHelper
Java Class VariableArray2dOfListFilesModeHolder |
public class VariableArray2dOfListFilesModeHolder
Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the
ListFilesMode type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilesModeHolder
CORBA Enum AssignmentContext |
Indicates how a fileref assignment was made.
Description
This enumeration indicates how a fileref assignment was made.
Usage
Member | Description |
---|---|
AssignmentContextRegular | A user created the name and assignment. Filerefs created by the FILENAME statement are in this category, as are ones created by the AssignFileref operation when you pass a non-empty AssignFileref::requestedName parameter. |
AssignmentContextTemporary | The fileref name was generated by the system; often as a result of a
user action.
Since temporary filerefs are programming mechanisms, not user-chosen logical names, it often better to suppress them when presenting lists of filerefs back to a user. |
AssignmentContextSystem | SAS created this fileref through a host-specific mechanism such as a DD statement under OS/390 or an environment variable on Unix. |
Java Class AssignmentContext |
public class AssignmentContext
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.AssignmentContext
Java Class AssignmentContextHelper |
public class AssignmentContextHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
AssignmentContext type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.AssignmentContextHelper
Java Class AssignmentContextHolder |
public class AssignmentContextHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
AssignmentContext type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.AssignmentContextHolder
Java Class AssignmentContextSeqHelper |
public class AssignmentContextSeqHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of
AssignmentContext type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.AssignmentContextSeqHelper
Java Class AssignmentContextSeqHolder |
public class AssignmentContextSeqHolder
Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the
AssignmentContext type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.AssignmentContextSeqHolder
Java Class VariableArray2dOfAssignmentContextHelper |
public class VariableArray2dOfAssignmentContextHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of
AssignmentContext type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfAssignmentContextHelper
Java Class VariableArray2dOfAssignmentContextHolder |
public class VariableArray2dOfAssignmentContextHolder
Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the
AssignmentContext type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfAssignmentContextHolder
CORBA Enum TypeCategory |
Describes how to interpret the type name that is returned by the ListFiles operation.
Description
This enumeration describes how to interpret the type name that is returned
by the ListFiles operation.
Usage
Member | Description |
---|---|
TypeCategoryDirectory | The type name should be ignored; the filename is a directory. |
TypeCategorySASType | SAS has recognized the file as being of a well-known type. The type name is a standard file type name in SAS and is portable across hosts. |
TypeCategoryExtension | SAS has not recognized the file as being of one of its well-known types. The type name is the file name's extension or it is blank if the file name has no extension. |
Java Class TypeCategory |
public class TypeCategory
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.TypeCategory
Java Class TypeCategoryHelper |
public class TypeCategoryHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
TypeCategory type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.TypeCategoryHelper
Java Class TypeCategoryHolder |
public class TypeCategoryHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
TypeCategory type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.TypeCategoryHolder
Java Class TypeCategorySeqHelper |
public class TypeCategorySeqHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of
TypeCategory type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.TypeCategorySeqHelper
Java Class TypeCategorySeqHolder |
public class TypeCategorySeqHolder
Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the
TypeCategory type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.TypeCategorySeqHolder
Java Class VariableArray2dOfTypeCategoryHelper |
public class VariableArray2dOfTypeCategoryHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of
TypeCategory type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfTypeCategoryHelper
Java Class VariableArray2dOfTypeCategoryHolder |
public class VariableArray2dOfTypeCategoryHolder
Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the
TypeCategory type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfTypeCategoryHolder
CORBA Enum ListFilesIndex |
Indices to the fieldInclusionMask array parameter of the ListFiles operation.
Description
This enumeration defines indices to the
ListFiles::fieldInclusionMask array parameter.
When passed, this mask indicates whether or not each of the corresponding
output parameters should be filled.
Usage
Member | Description |
---|---|
ListFilesIndexNames | The mask element which corresponds to the array of file names (ListFiles::names). |
ListFilesIndexTypeNames | The mask element which corresponds to the array of type names (ListFiles::typenames). |
ListFilesIndexTypeCategories | The mask element which corresponds to the array of type categories (ListFiles::typeCategories). |
ListFilesIndexSizes | The mask element which corresponds to the array of file sizes (ListFiles::sizes). |
ListFilesIndexModTimes | The mask element which corresponds to the array of last-modified times (ListFiles::modtimes). |
ListFilesIndexEngines | The mask element which corresponds to the array of engine names (ListFiles::engines). |
ListFilesIndexNumIndices | The number of elements in the field inclusion mask for the ListFiles operation. |
Java Class ListFilesIndex |
public class ListFilesIndex
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesIndex
Java Class ListFilesIndexHelper |
public class ListFilesIndexHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
ListFilesIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesIndexHelper
Java Class ListFilesIndexHolder |
public class ListFilesIndexHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
ListFilesIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesIndexHolder
Java Class ListFilesIndexSeqHelper |
public class ListFilesIndexSeqHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of
ListFilesIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesIndexSeqHelper
Java Class ListFilesIndexSeqHolder |
public class ListFilesIndexSeqHolder
Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the
ListFilesIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilesIndexSeqHolder
Java Class VariableArray2dOfListFilesIndexHelper |
public class VariableArray2dOfListFilesIndexHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of
ListFilesIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilesIndexHelper
Java Class VariableArray2dOfListFilesIndexHolder |
public class VariableArray2dOfListFilesIndexHolder
Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the
ListFilesIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilesIndexHolder
CORBA Enum ListFilerefsIndex |
Indices to the fieldInclusionMask array parameter to the ListFileref operation.
Description
This enumeration defines indices to the
ListFilerefs::fieldInclusionMask array parameter.
When passed, this mask indicates whether or not each of the corresponding
output parameters should be filled.
Usage
Member | Description |
---|---|
ListFilerefsIndexNames | The mask element which corresponds to the array of fileref names (ListFilerefs::names). |
ListFilerefsIndexAssignmentContexts | The mask element which corresponds to the array of fileref assignment contexts (ListFilerefs::assignmentContexts). |
ListFilerefsIndexPaths | The mask element which corresponds to the array of fileref physical file paths (ListFilerefs::paths). |
ListFilerefsIndexAccessMethods | The mask element which corresponds to the array of fileref access method names (ListFilerefs::accessMethods). |
ListFilerefsIndexNumIndices | The number of elements in the field inclusion mask for the ListFilerefs operation. |
Java Class ListFilerefsIndex |
public class ListFilerefsIndex
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilerefsIndex
Java Class ListFilerefsIndexHelper |
public class ListFilerefsIndexHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
ListFilerefsIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilerefsIndexHelper
Java Class ListFilerefsIndexHolder |
public class ListFilerefsIndexHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
ListFilerefsIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilerefsIndexHolder
Java Class ListFilerefsIndexSeqHelper |
public class ListFilerefsIndexSeqHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate singly dimensioned arrays of
ListFilerefsIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilerefsIndexSeqHelper
Java Class ListFilerefsIndexSeqHolder |
public class ListFilerefsIndexSeqHolder
Description
Implementing class for methods (_read, _write, _type) used to process singly dimensioned arrays of the
ListFilerefsIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.ListFilerefsIndexSeqHolder
Java Class VariableArray2dOfListFilerefsIndexHelper |
public class VariableArray2dOfListFilerefsIndexHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate doubly dimensioned arrays of
ListFilerefsIndex type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilerefsIndexHelper
Java Class VariableArray2dOfListFilerefsIndexHolder |
public class VariableArray2dOfListFilerefsIndexHolder
Description
Implementing class for methods (_read, _write, _type) used to process doubly dimensioned arrays of the
ListFilerefsIndex type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_0Package.VariableArray2dOfListFilerefsIndexHolder
CORBA Attribute Parent (readonly) |
The workspace containing this file service.
Description
This attribute allows you to navigate back to the Workspace of
this FileService component.
All files and filerefs accessed through this service are those
visible in the parent workspace.
Usage
Java Method Parent |
public IWorkspace Parent ();
CORBA Method ListFiles |
Lists all files in a directory.
Description
This operation lists all files in the specified directory.
It returns six output arrays.
The ListFiles::fieldInclusionMask parameter
indicates which of the individual output arrays are filled by the call.
A filled output array contains one element
for each file in the directory.
Thus, all the filled output
arrays are the same size and the complete information
about a particular file in the directoy
is available from the corresponding (same
index) elements of each array.
When an output array is not filled, it contains zero elements on return
from the call.
The semantics of this operation are based on the model of a hierarchical, directory-based filesystem as popularized by Unix and adopted by PC operating systems. For some host filesystems, notably mainframes, the native filesystems do not conform to this model. In these cases, SAS provides an emulation of a hierarchical, directory-based system.
For SAS under OS/390, this method has only experimental status. Its behaviour may change in future releases.
Usage
Java Method ListFiles |
void
ListFiles (
java.lang.String path , ListFilesMode mode , boolean[] fieldInclusionMask , org.omg.CORBA.StringHolder listedPath , StringSeqHolder names , StringSeqHolder typenames , TypeCategorySeqHolder typeCategories , IntSeqHolder sizes , DateTimeSeqHolder modtimes , StringSeqHolder engines ) throws ( InvalidFieldMask, GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
path | in | java.lang.String | This parameter is used together with the ListFiles::mode parameter to determine which directory is listed. |
mode | in | ListFilesMode | One of the ListFilesMode enumeration values. |
fieldInclusionMask | in | boolean[] | This input parameter determines which of the six array
output parameters are filled by the call.
You must supply an array of either zero or
six (ListFilesIndexNumIndices) elements.
The simplest approach is to supply a zero-element array for the mask. If you do this, then all of the output arrays will be filled. You can make the call more efficient by indicating which output parameters need to be filled and which don't. The potential efficiency improvement is partly a result of reduced network traffic, but comes primarily from reducing the amount of work required on the server. If you supply a six-element mask array, then each element indicates whether or not the corresponding output parameter will be filled by the call. The correspondence between mask array elements and output parameters is defined by the ListFilesIndex enumeration. If, for example, you don't need the file modification times, then you should set mask[ListFilesIndexModTimes] to false. |
listedPath | out | org.omg.CORBA.StringHolder | Returns the name of the directory selected by the ListFiles::path
and ListFiles::mode.
Note that the returned value of this output parameter will only be the same directory as the ListFiles::path parameter when you to set ListFiles::mode to ListFilesModePath. |
names | out | StringSeqHolder | This array output parameter returns the names of all files
and directories in the requested directory.
These names are "short names" in that the
full pathname is not provided.
The names
do include any extension (such as ".sas").
In order to create a full pathname, combine the returned ListFiles::listedPath parameter with an entry in this array using FullName. |
typenames | out | StringSeqHolder | Indicates the type of each file. It will be blank for subdirectories.
This should be used in conjunction with the following parameter (ListFiles::typeCategories). |
typeCategories | out | TypeCategorySeqHolder | The elements of this array output parameter define the interpretation of the corresponding elements in the output array of type names. See TypeCategory for details. |
sizes | out | IntSeqHolder | The number of bytes in each file or subdirectory.
Note that the meaning of this parameter is host-dependent and does not necessarily correspond to the size of the contents of the directory. |
modtimes | out | DateTimeSeqHolder | The last-modified time for each file or subdirectory, generally in
terms of local time.
A particular local time value may be based on the time zone of the SAS IOM server, or it may be the local time of the computer that stored the timestamp. There is no way to determine whose local time is represented. Besides geography, time zone is also set by Daylight Savings Time changes. Thus, the same computer can read and write timestamps in different time zones in different parts of the year. For some files on some hosts, it may be possible to retrieve a date, but not time-of-day. In some other cases, even the date may be unknown. For unknown dates, SAS base date of midnight, January 1 1960 will generally be returned. Given the number of filesystems with which SAS interacts, the accuracy of this datetime may vary. |
engines | out | StringSeqHolder | Returns the SAS library engine associated with each SAS file in a SAS data library. If the file is not a member of a SAS data library, the engine value will be an empty string. |
Example
CORBA Method DeleteFile |
Deletes a file or directory.
Description
Usage
Java Method DeleteFile |
void
DeleteFile (
java.lang.String path ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
path | in | java.lang.String | If the file was located using ListFiles, then you should use FullName to form the path. |
Example
CORBA Method MakeDirectory |
Creates a new directory.
Description
This operation creates a new directory.
The call combines the input parameters to create the
full pathname of the directory to be created and then
returns that full path.
Note that not all access methods support the creation of a directory.
Usage
Java Method MakeDirectory |
java.lang.String
MakeDirectory (
java.lang.String parentDirectory , java.lang.String directoryName ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
parentDirectory | in | java.lang.String | The operating system-dependent full pathname of the directory that is to contain the new directory. |
directoryName | in | java.lang.String | The name of the new directory. |
Example
CORBA Method RenameFile |
Renames an existing file or directory.
Description
This operation renames an existing file or directory.
Usage
Java Method RenameFile |
void
RenameFile (
java.lang.String oldPath , java.lang.String newPath ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
oldPath | in | java.lang.String | The full pathname of the existing file or directory that is to be renamed. For best operation with servers on different operating systems, if the file was located using ListFiles, then you should use FullName to form the path. |
newPath | in | java.lang.String | The full pathname of the new file or directory. For best operation with servers on different operating systems, if the new file name will be created by combining a "short name" with a directory located using ListFiles, then you should use FullName to form the path. |
Example
CORBA Method FullName |
Returns the full pathname given a file name and directory name.
Description
This operation returns the full pathname given a file name and directory name.
It accommodates the fact that not all host platforms
and filesystems use the same syntax for indicating
directory hierarchy relationships.
This operation is typically called to create a full pathname from one of the names returned from ListFiles.
For SAS under OS/390, this method has only experimental status. Its behaviour may change in future releases.
Usage
Java Method FullName |
java.lang.String
FullName (
java.lang.String shortName , java.lang.String parentName ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
shortName | in | java.lang.String | The name of the file or directory that needs to be combined into a full pathname. |
parentName | in | java.lang.String | A pathname of the directory to contain the shortName. |
Example
CORBA Method SplitName |
Breaks a pathname into a directory and member. Useful for creating a libname.
Description
Break a pathname into a directory and member.
For SAS under OS/390, this method has only experimental status. Its behaviour may change in future releases.
Usage
Java Method SplitName |
void
SplitName (
java.lang.String path , org.omg.CORBA.StringHolder shortName , org.omg.CORBA.StringHolder parentName ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
path | in | java.lang.String | The operating system-dependent pathname that needs to be broken out into the containing directory and the contained file or subdirectory. |
shortName | out | org.omg.CORBA.StringHolder | The returned file or subdirectory that is specified by SplitName::path. |
parentName | out | org.omg.CORBA.StringHolder | The returned directory that contains SplitName::shortName. |
Example
CORBA Method ListFilerefs |
Returns a list of all assigned filerefs on the current SAS Workspace.
Description
This operation
returns information about the assigned filerefs in the Workspace.
It returns four output arrays.
The ListFilerefs::fieldInclusionMask parameter
indicates which of the individual output arrays are filled by the call.
A filled output array contains one element
for each fileref in the workspace.
Thus, all the filled output
arrays are the same size and the complete information
about a particular fileref is available from the corresponding (same
index) elements of each array.
When an output array is not filled, it contains zero elements on return
from the call.
In the case of a concatenated fileref, multiple entries for the same fileref will be returned, corresponding to each concatenated member.
Usage
Note that there is not enough information returned in this method to
fully recreate the original fileref; the original options are not available.
Java Method ListFilerefs |
void
ListFilerefs (
boolean[] fieldInclusionMask , StringSeqHolder names , AssignmentContextSeqHolder assignmentContexts , StringSeqHolder paths , StringSeqHolder accessMethods ) throws ( InvalidFieldMask, GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
fieldInclusionMask | in | boolean[] | This input parameter determines which of the four array
output parameters are filled by the call.
You must supply an array of either zero or
four (ListFilerefsIndexNumIndices) elements.
The simplest approach is to supply a zero-element array for the mask. If you do this, then all of the output arrays will be filled. You can make the call a little more efficient by indicating which output parameters need to be filled and which don't. If you supply a four-element mask array, then each element indicates whether or not the corresponding output parameter will be filled by the call. The correspondence between mask array elements and output parameters is defined by the ListFilerefsIndex enumeration. If, for example, you don't need the access method names, then you should set mask[ListFilerefsIndexAccessMethods] to false.
|
names | out | StringSeqHolder | The name of each fileref assigned in the workspace. |
assignmentContexts | out | AssignmentContextSeqHolder | This array output parameter
indicates how each fileref was assigned.
See AssignmentContext for details.
Do not rely on the naming scheme for temporary filerefs; these can change between hosts and between releases of SAS. |
paths | out | StringSeqHolder | Indicates the pathname associated with each fileref. |
accessMethods | out | StringSeqHolder | Indicates the accessMethod (also called device by some documentation) that was used when each fileref was created. |
Example
CORBA Method AssignFileref |
Assign a SAS fileref.
Description
This operation assigns a fileref in a manner analogous
to the SAS language FILENAME statement.
This call creates and returns a Fileref component to
represent the new fileref.
Usage
Java Method AssignFileref |
public IFileref
AssignFileref (
java.lang.String requestedName , java.lang.String accessMethodOrDevice , java.lang.String externalFile , java.lang.String hostOptions , org.omg.CORBA.StringHolder assignedName ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
requestedName | in | java.lang.String | The name to use for this fileref.
This should be 8 or fewer characters. If you pass in an empty string, an access method value of "TEMP", then the call will create a temporary file. |
accessMethodOrDevice | in | java.lang.String | Indicates the access method that will handle fileref.
You can use PROC NICKNAME to get a list of all access methods supported on your host. Different hosts support a different set of access methods. |
externalFile | in | java.lang.String | The file or directory (or access method-specific string) with which to associate the fileref. Note that this can be a concatenated list of files using the same syntax as in the SAS language FILENAME statement. |
hostOptions | in | java.lang.String | The options to use when creating the fileref. Most of these are specific to the host or access method. |
assignedName | out | org.omg.CORBA.StringHolder | Returns the assignedName. The assignedName will differ from the requested name when a temporary fileref is requested. |
Example
CORBA Method DeassignFileref |
Deassigns a fileref.
Description
This operation deassigns the specified fileref.
and destroys the associated fileref object.
It is analogous to the FILENAME CLEAR statement
in the SAS language.
Usage
Java Method DeassignFileref |
void
DeassignFileref (
java.lang.String name ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
name | in | java.lang.String | The name of the fileref to deassign. |
Example
CORBA Method UseFileref |
Obtains the fileref component for the specified fileref name.
Description
This operation locates and returns the Fileref component
for a given fileref name.
Usage
You should you call this operation when the fileref has already
been assigned within the SAS Workspace and you are
simply trying to retieve the Fileref component.
If you need to perform the assignment first, call
AssignFileref.
Java Method UseFileref |
public IFileref
UseFileref (
java.lang.String name ) throws ( GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
name | in | java.lang.String | The name of the previously assigned fileref to obtain. An error will occur if the requested fileref has not been previously assigned. |
Example
IFileService_1_1 Description
public interface IFileService_1_1
Extends IFileService
Method Summary
void | ListFiles_2
(
java.lang.String path ,
ListFilesMode mode ,
boolean[] fieldInclusionMask ,
org.omg.CORBA.StringHolder listedPath ,
StringSeqHolder names ,
StringSeqHolder typenames ,
TypeCategorySeqHolder typeCategories ,
IntSeqHolder sizes ,
DateTimeSeqHolder modtimes ,
StringSeqHolder engines
)
throws ( InvalidFieldMask, DeviceNotMounted, GenericError ); Lists all files in a directory. |
Java Class IFileService_1_1Helper |
public class IFileService_1_1Helper
Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the
IFileService_1_1 type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_1Helper
Java Class IFileService_1_1Holder |
public class IFileService_1_1Holder
Description
Implementing class for methods (_read, _write, _type) used to process the
IFileService_1_1 type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_1Holder
CORBA Exception DeviceNotMounted |
Indicates that the specified device is not available for access.
Description
Java Class DeviceNotMounted |
public class DeviceNotMounted
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.omg.CORBA.UserException | +--com.sas.iom.SAS.IFileService_1_1Package.DeviceNotMounted
Java Class DeviceNotMountedHelper |
public class DeviceNotMountedHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
DeviceNotMounted type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_1Package.DeviceNotMountedHelper
Java Class DeviceNotMountedHolder |
public class DeviceNotMountedHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
DeviceNotMounted type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_1Package.DeviceNotMountedHolder
CORBA Method ListFiles_2 |
Lists all files in a directory.
Description
This operation lists all files in the specified directory.
This operation will fail and return DeviceNotMounted
if the device it is attempting to read is not available for read access.
It returns six output arrays. The ListFiles::fieldInclusionMask parameter indicates which of the individual output arrays are filled by the call. A filled output array contains one element for each file in the directory. Thus, all the filled output arrays are the same size and the complete information about a particular file in the directoy is available from the corresponding (same index) elements of each array. When an output array is not filled, it contains zero elements on return from the call.
The semantics of this operation are based on the model of a hierarchical, directory-based filesystem as popularized by Unix and adopted by PC operating systems. For some host filesystems, notably mainframes, the native filesystems do not conform to this model. In these cases, SAS provides an emulation of a hierarchical, directory-based system.
For SAS under OS/390, this method has only experimental status. Its behaviour may change in future releases.
Usage
Java Method ListFiles_2 |
void
ListFiles_2 (
java.lang.String path , ListFilesMode mode , boolean[] fieldInclusionMask , org.omg.CORBA.StringHolder listedPath , StringSeqHolder names , StringSeqHolder typenames , TypeCategorySeqHolder typeCategories , IntSeqHolder sizes , DateTimeSeqHolder modtimes , StringSeqHolder engines ) throws ( InvalidFieldMask, DeviceNotMounted, GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
path | in | java.lang.String | This parameter is used together with the ListFiles::mode parameter to determine which directory is listed. |
mode | in | ListFilesMode | One of the ListFilesMode enumeration values. |
fieldInclusionMask | in | boolean[] | This input parameter determines which of the six array
output parameters are filled by the call.
You must supply an array of either zero or
six (ListFilesIndexNumIndices) elements.
The simplest approach is to supply a zero-element array for the mask. If you do this, then all of the output arrays will be filled. You can make the call more efficient by indicating which output parameters need to be filled and which don't. The potential efficiency improvement is partly a result of reduced network traffic, but comes primarily from reducing the amount of work required on the server. If you supply a six-element mask array, then each element indicates whether or not the corresponding output parameter will be filled by the call. The correspondence between mask array elements and output parameters is defined by the ListFilesIndex enumeration. If, for example, you don't need the file modification times, then you should set mask[ListFilesIndexModTimes] to false. |
listedPath | out | org.omg.CORBA.StringHolder | Returns the name of the directory selected by the ListFiles::path
and ListFiles::mode.
Note that the returned value of this output parameter will only be the same directory as the ListFiles::path parameter when you to set ListFiles::mode to ListFilesModePath. |
names | out | StringSeqHolder | This array output parameter returns the names of all files
and directories in the requested directory.
These names are "short names" in that the
full pathname is not provided.
The names
do include any extension (such as ".sas").
In order to create a full pathname, combine the returned ListFiles::listedPath parameter with an entry in this array using FullName. |
typenames | out | StringSeqHolder | Indicates the type of each file. It will be blank for subdirectories.
This should be used in conjunction with the following parameter (ListFiles::typeCategories). |
typeCategories | out | TypeCategorySeqHolder | Defines the interpretation of each corresponding type name. |
sizes | out | IntSeqHolder | The number of bytes in each file or subdirectory.
Note that the meaning of this parameter is host-dependent and does not necessarily correspond to the size of the contents of the directory. |
modtimes | out | DateTimeSeqHolder | The last-modified time for each file or subdirectory, generally in
terms of local time.
A particular local time value may be based on the time zone of the SAS IOM server, or it may be the local time of the computer that stored the timestamp. There is no way to determine whose local time is represented. Besides geography, time zone is also set by Daylight Savings Time changes. Thus, the same computer can read and write timestamps in different time zones in different parts of the year. For some files on some hosts, it may be possible to retrieve a date, but not time-of-day. In some other cases, even the date may be unknown. For unknown dates, the SAS base date of midnight, January 1 1960 will generally be returned. Given the number of filesystems with which SAS interacts, the accuracy of this datetime may vary. |
engines | out | StringSeqHolder | Returns the SAS library engine associated with each SAS file in a SAS data library. If the file is not a member of a SAS data library, the engine value will be an empty string. |
Example
IFileService_1_2 Description
public interface IFileService_1_2
Extends IFileService_1_1
Method Summary
void | ListFiles_3
(
java.lang.String path ,
int mode ,
boolean[] fieldInclusionMask ,
org.omg.CORBA.StringHolder listedPath ,
StringSeqHolder names ,
StringSeqHolder typenames ,
TypeCategorySeqHolder typeCategories ,
LongSeqHolder sizes ,
DateTimeSeqHolder modtimes ,
StringSeqHolder engines
)
throws ( InvalidFieldMask, DeviceNotMounted, InvalidFieldMode, GenericError ); Lists all files in a directory. |
Java Class IFileService_1_2Helper |
public class IFileService_1_2Helper
Description
Implementing class for methods (insert, extract, type, id, read, write, narrow) used to manipulate the
IFileService_1_2 type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_2Helper
Java Class IFileService_1_2Holder |
public class IFileService_1_2Holder
Description
Implementing class for methods (_read, _write, _type) used to process the
IFileService_1_2 type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_2Holder
CORBA Exception InvalidFieldMode |
Description
Java Class InvalidFieldMode |
public class InvalidFieldMode
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--org.omg.CORBA.UserException | +--com.sas.iom.SAS.IFileService_1_2Package.InvalidFieldMode
Java Class InvalidFieldModeHelper |
public class InvalidFieldModeHelper
Description
Implementing class for methods (insert, extract, type, id, read, write) used to manipulate the
InvalidFieldMode type.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_2Package.InvalidFieldModeHelper
Java Class InvalidFieldModeHolder |
public class InvalidFieldModeHolder
Description
Implementing class for methods (_read, _write, _type) used to process the
InvalidFieldMode type as an out parameter.
java.lang.Object | +--com.sas.iom.SAS.IFileService_1_2Package.InvalidFieldModeHolder
CORBA Method ListFiles_3 |
Lists all files in a directory.
Description
This operation lists all files in the specified directory.
This operation will fail and return DeviceNotMounted
if the device it is attempting to read is not available for read access.
It returns six output arrays. The ListFiles::fieldInclusionMask parameter indicates which of the individual output arrays are filled by the call. A filled output array contains one element for each file in the directory. Thus, all the filled output arrays are the same size and the complete information about a particular file in the directoy is available from the corresponding (same index) elements of each array. When an output array is not filled, it contains zero elements on return from the call.
The semantics of this operation are based on the model of a hierarchical, directory-based filesystem as popularized by Unix and adopted by PC operating systems. For some host filesystems, notably mainframes, the native filesystems do not conform to this model. In these cases, SAS provides an emulation of a hierarchical, directory-based system.
For SAS under OS/390, this method has only experimental status. Its behaviour may change in future releases.
Usage
Java Method ListFiles_3 |
void
ListFiles_3 (
java.lang.String path , int mode , boolean[] fieldInclusionMask , org.omg.CORBA.StringHolder listedPath , StringSeqHolder names , StringSeqHolder typenames , TypeCategorySeqHolder typeCategories , LongSeqHolder sizes , DateTimeSeqHolder modtimes , StringSeqHolder engines ) throws ( InvalidFieldMask, DeviceNotMounted, InvalidFieldMode, GenericError );
Parameter Details
Parameter | Direction | Type | Description |
---|---|---|---|
path | in | java.lang.String | This parameter is used together with the mode parameter to determine which directory is listed. |
mode | in | int | 32 bit integer:
0: (ListFilesModeRoot) The ListFiles operation will list the host-specific system root directory. The ListFiles::path parameter is ignored. 1: (ListFilesModeUser) The ListFiles operation will list the host-specific user home directory. The ListFiles::path parameter is ignored. 2: (ListFilesModePath) The ListFiles operation will list the directory specified in the path parameter. 3: (ListFilesModeParentofPath) The ListFiles operation will list the directory that is the parent of the directory specified in path. 4: (new mode for ListFiles_3) The ListFiles operation will list the directory specified in the path parameter; directory members will be complete pathnames. Any other mode value will cause ListFiles to fail and return InvalidFieldMode. |
fieldInclusionMask | in | boolean[] | This input parameter determines which of the six array
output parameters are filled by the call.
You must supply an array of either zero or
six (ListFilesIndexNumIndices) elements.
The simplest approach is to supply a zero-element array for the mask. If you do this, then all of the output arrays will be filled. You can make the call more efficient by indicating which output parameters need to be filled and which don't. The potential efficiency improvement is partly a result of reduced network traffic, but comes primarily from reducing the amount of work required on the server. If you supply a six-element mask array, then each element indicates whether or not the corresponding output parameter will be filled by the call. The correspondence between mask array elements and output parameters is defined by the ListFilesIndex enumeration. If, for example, you don't need the file modification times, then you should set mask[ListFilesIndexModTimes] to false. |
listedPath | out | org.omg.CORBA.StringHolder | Returns the name of the directory selected by the ListFiles_3::path
and ListFiles_3::mode.
Note that the returned value of this output parameter will only be the same directory as the ListFiles_3::path parameter when you to set the mode parameter as 2. |
names | out | StringSeqHolder | This array output parameter returns the names of all files and
directories in the requested directory. If the mode parameter
is NOT 4 then these names are "short names" in that the full
pathname is not provided. The names do include any
extension (such as ".sas"). If the mode parameter is 4, then
these names are full pathnames of the members specfied by the
path parameter.
If not using a mode parameter of 4, a full pathname can be created by combining the returned ListFiles_3::listedPath parameter with an entry in this array using FullName. |
typenames | out | StringSeqHolder | Indicates the type of each file. It will be blank for subdirectories.
This should be used in conjunction with the following parameter (ListFiles::typeCategories). |
typeCategories | out | TypeCategorySeqHolder | The elements of this array output parameter define the interpretation of the corresponding elements in the output array of type names. See TypeCategory for details. |
sizes | out | LongSeqHolder | The number of bytes in each file or subdirectory.
Note that the meaning of this parameter is host-dependent and does not necessarily correspond to the size of the contents of the directory. |
modtimes | out | DateTimeSeqHolder | The last-modified time for each file or subdirectory, generally in
terms of local time.
A particular local time value may be based on the time zone of the SAS IOM server, or it may be the local time of the computer that stored the timestamp. There is no way to determine whose local time is represented. Besides geography, time zone is also set by Daylight Savings Time changes. Thus, the same computer can read and write timestamps in different time zones in different parts of the year. For some files on some hosts, it may be possible to retrieve a date, but not time-of-day. In some other cases, even the date may be unknown. For unknown dates, the SAS base date of midnight, January 1 1960 will generally be returned. Given the number of filesystems with which SAS interacts, the accuracy of this datetime may vary. |
engines | out | StringSeqHolder | Returns the SAS library engine associated with each SAS file in a SAS data library. If the file is not a member of a SAS data library, the engine value will be an empty string. |
Example
001 import com.sas.iom.SAS.IWorkspace; 002 import com.sas.iom.SAS.IWorkspaceHelper; 003 import com.sas.iom.SAS.ILanguageService; 004 import com.sas.iom.SAS.IFileService; 005 import com.sas.iom.SAS.IFileService_1_2; 006 import com.sas.iom.SAS.IFileService_1_2Helper; 007 import com.sas.services.connection.BridgeServer; 008 import com.sas.services.connection.ConnectionFactoryAdminInterface; 009 import com.sas.services.connection.ConnectionFactoryConfiguration; 010 import com.sas.services.connection.ConnectionFactoryInterface; 011 import com.sas.services.connection.ConnectionFactoryManager; 012 import com.sas.services.connection.ConnectionInterface; 013 import com.sas.services.connection.ManualConnectionFactoryConfiguration; 014 import com.sas.services.connection.Server; 015 016 import com.sas.iom.SAS.IFileServicePackage.AssignmentContextSeqHolder; 017 import com.sas.iom.SAS.IFileServicePackage.ListFilesMode; 018 import com.sas.iom.SAS.IFileServicePackage.TypeCategorySeqHolder; 019 import com.sas.iom.SASIOMDefs.DateTimeSeqHolder; 020 import com.sas.iom.SASIOMDefs.LongSeqHolder; 021 import com.sas.iom.SASIOMDefs.LongLongSeqHolder; 022 import com.sas.iom.SASIOMDefs.StringSeqHolder; 023 024 import java.util.Properties; 025 import java.util.Enumeration; 026 import java.lang.*; 027 028 029 public class wslistfiles 030 { 031 public static void main ( String argv[]) 032 { 033 String path = null; 034 String [] stringSeq = null; 035 String [] stringSeq2 = null; 036 com.sas.iom.SAS.IFileServicePackage.TypeCategory [] typeCat = null; 037 038 LongSeqHolder sizesholder = new LongSeqHolder(); 039 LongLongSeqHolder sizes64holder = new LongLongSeqHolder(); 040 int [] sizes = null; 041 long [] sizes64 = null; 042 043 ListFilesMode mode = ListFilesMode.ListFilesModePath; 044 045 boolean[] fieldInclusionMask = new boolean[0]; 046 org.omg.CORBA.StringHolder listedPath = new org.omg.CORBA.StringHolder(); 047 org.omg.CORBA.StringHolder shortName = new org.omg.CORBA.StringHolder(); 048 org.omg.CORBA.StringHolder parentName = new org.omg.CORBA.StringHolder(); 049 StringSeqHolder names = new StringSeqHolder(); 050 StringSeqHolder typenames = new StringSeqHolder(); 051 StringSeqHolder paths = new StringSeqHolder(); 052 StringSeqHolder accessMethods = new StringSeqHolder(); 053 AssignmentContextSeqHolder assignmentContexts = new AssignmentContextSeqHolder(); 054 TypeCategorySeqHolder typeCategories = new TypeCategorySeqHolder(); 055 056 DateTimeSeqHolder modtimes = new DateTimeSeqHolder(); 057 StringSeqHolder engines = new StringSeqHolder(); 058 int fileIndex = 0; 059 060 try 061 { 062 // identify the IOM server 063 String classID = Server.CLSID_SAS; 064 String host = "wsttk2.na.sas.com"; 065 int port = 6785; 066 Server server = new BridgeServer(classID,host,port); 067 068 // make a connection factory configuration with the server 069 ConnectionFactoryConfiguration cxfConfig = 070 new ManualConnectionFactoryConfiguration(server); 071 072 // get a connection factory manager 073 ConnectionFactoryManager cxfManager = new ConnectionFactoryManager(); 074 075 // get a connection factory that matches the configuration 076 ConnectionFactoryInterface cxf = cxfManager.getFactory(cxfConfig); 077 078 // get the administrator interface 079 ConnectionFactoryAdminInterface admin = cxf.getAdminInterface(); 080 081 // get a connection 082 String userName = "[username]"; 083 String password = "[password]"; 084 ConnectionInterface cx = cxf.getConnection(userName,password); 085 org.omg.CORBA.Object obj = cx.getObject(); 086 IWorkspace iWorkspace = IWorkspaceHelper.narrow(obj); 087 088 System.out.println("Starting File Service"); 089 IFileService fs = iWorkspace.FileService(); 090 IFileService_1_2 fs2 = IFileService_1_2Helper.narrow(fs); 091 092 // Path to list 093 path = "\\\\wsttk2.na.sas.com\\public"; 094 095 try 096 { 097 System.out.println("Testing ListFiles()"); 098 099 fs.ListFiles(path, ListFilesMode.ListFilesModePath, fieldInclusionMask, 100 listedPath, names, typenames, typeCategories, sizesholder, 101 modtimes, engines); 102 103 System.out.println("listedPath: " + listedPath.value); 104 stringSeq = names.value; 105 stringSeq2 = typenames.value; 106 typeCat = typeCategories.value; 107 sizes = sizesholder.value; 108 for(fileIndex=0; fileIndex < stringSeq.length; fileIndex++) 109 { 110 System.out.println("File: " + stringSeq[fileIndex] 111 + " TypeName: " + stringSeq2[fileIndex] 112 + " TypeCategory: " + typeCat[fileIndex].value() 113 + " Size: " + sizes[fileIndex]); 114 } 115 } 116 catch(Exception e) { 117 System.out.println("Exception encountered in ListFiles()"); 118 System.out.println(e); 119 } 120 121 try 122 { 123 System.out.println("Testing ListFiles_3()"); 124 int new_mode_parm = 4; // return full path 125 fs2.ListFiles_3(path, new_mode_parm, fieldInclusionMask, 126 listedPath, names, typenames, typeCategories, sizes64holder, 127 modtimes, engines); 128 129 System.out.println("listedPath: " + listedPath.value); 130 131 stringSeq = names.value; 132 stringSeq2 = typenames.value; 133 typeCat = typeCategories.value; 134 sizes64 = sizes64holder.value; 135 for(fileIndex=0; fileIndex < stringSeq.length; fileIndex++) 136 { 137 System.out.println("File: " + stringSeq[fileIndex] 138 + " TypeName: " + stringSeq2[fileIndex] 139 + " TypeCategory: " + typeCat[fileIndex].value() 140 + " Size: " + sizes64[fileIndex]); 141 } 142 } 143 144 catch(Exception e) { 145 System.out.println("Exception encountered in ListFiles_3()"); 146 System.out.println(e); 147 } 148 } 149 catch (Exception e) { 150 System.out.println("Exception encountered"); 151 e.printStackTrace(); 152 } 153 154 System.out.println("Done!" ); 155 } 156 }