• Aucun résultat trouvé

° Select O_Choice) O_Result;

Dans le document USERS' MANUAL SUPPLEMENT (Page 43-48)

Function O_Krunch (D_Unit:integer; D_Block:integer): O_Result;

Function 0 Mount (0 File Name:String): 0 Result;

Function O-OisMount-(O_ Vol_Name:String):-O_ Result;

II-31

New and Upgraded Standard Facilities

D.3.6.1.8 Detailed Descript,ior:l of Functions

Function D_Krunch (D_Unit:integer; D_Block:integer) D_Result;

This function will move the files on the volume specified by 0 Unit. The block indicated by 0 Block will be inclu,ded in the resulting unused disk space area.

Files located befure 0 Block will be moved forward (toward the directory) and files after it will be moved-backward (toward the last track).

NOTE: Using 0 Krunch on a volume that contains an executing or open file (including the operating system) may destroy the files. If Function D_Krunch changes the location of an open or executing file, the system will return data to the previous, not present location of the file.

The 0 File Name parameter identifies a subsidiary volume that is to be mounted.

Wild cards may be used. The volume will be mounted unless 0 Result indicates otherwise.

Function 0 DisMount (D_Vol_Name:String):O_Result;

The subsidiary volume identified by the 0 Vol Name parameter is dismounted. This volume must be a subsidiary volume.

-Function 0 Scan Title(D NAME:String; Var 0 VOLUME,

D_TITLE: String;Var D_TYPE: D_NameType; Var D_SEGS: Integer):D_Result;

o

Scan Title parses the UCSO p-System file name passed in 0 NAME, and returns the file name's volume 10, file title, file type, and file length specifier. The function result indicates the validity of the file name argument. 0 Scan Title does not determine whether or not 0 Name actually exists.

-Parameters and Function Results:

0_ Scan_Title accepts the following parameters.

O_NAME--A string containing a UCSO p-System file name.

o

VOLUME--A string which returns the volume 10 contained in 0 NAME. If O-NAME contains no volume 10 or if the volume 10 is ':', 0 VOLUME is assigned the system's default volume name. If the volume 10 is

'*"

or '*':',

o

VOLUME is assigned the system's boot volume name. Volume names assigned to 0 VOLUME contain only upper case characters, and do not contain blank characters.

11-32

Users' Manual Supplement, Version IV New and Upgraded Standard Facilities

o

TITLE--A string which returns the file title contained in 0 NAME. If O-NAME does not contain a file title, 0 TITLE is assigned the empty string.

File titles assigned to 0 TITLE contain oni'Y upper case characters, and do not contain blank

characters.-o

TYPE--A scalar which returns a value indicating the file type of the file name contained in 0 NAME.

Definition of 0 TYPE's scalar type:

OYJameType

=

CD_Vol, D_Code, D_Text, O_SVol, D_Oata, D_Temp, D_Free,);

D TYPE is set to 0 Vol if the file title in D NAME is empty. 0 TYPE is set to D Code if the fii'e title is terminated by 't:CODE" or to 0 Text if the file ti tIe

IS

terminated by ".TEXT" or ".BACK". 0 TYPE is set to' D SVOL if the file title ends with .SVOL (a subsidiary volumeJ. If none of the- above holds true, D TYPE is set to D Data. Only the suffix of a file is used for determine what type it is. -For example, the file name SYSTEM.COMPILER is returned as a data file because it's suffix is not .COOE •

D SEGS--An integer that is assigned a value indicating the presence of a file length specifier in D_NAME. The value returned in 0 SEGS is assigned as follows:

LENGTH SPECIFIER [<number>]

[*]

<not present)

D SEGS VALUE

<number>

-1

a

o

Scan Title returns a function result of type 0 Result. The only scalar values returned by D_Scan_Title are D_Okay and D_Name -Error; they have the following meanings:

0_ Okay--No Error. All information retumed by 0 Scan Title is valid.

o

Name Error--Illegal file name syntax in 0 NAME. The information returned by O_Scan Title is invalid.

II-33

New and Upgraded Standard Facilities

Users' Manual Supplement, Version IV New and Upgraded Standard Facilities

Function 0 Dir List (0 NAME:String;

- - - DSREcr

Var 0 PTR

o

PINFO

: 0 Choice;

: DListP;

: Boolean) : O_Result;

o

Oir List creates a list of records containing directory information on volumes and disk files. This information includes volume names and unit numbers of blocked and unblocked on-line units, number of files on blocked units, lengths and starting blocks of disk files and unused disk spaces, file names and types, and file dates. The function result value indicates invalid file name arguments, off-line volumes, or not-found files.

o

Oir List optionally provides information describing how the wild card file name argument matched files and/or volumes.

Parameters and Function Results:

o

Oir List accepts a set specifying the file types on which to return information, and a- string containing a file name. 0 Oir List returns a pointer to a linked list of directory information records. Each record contains the name of a file or volume which matches the file name argument and also is one of the types specified in the file type set.

o

NAME--The 0 NAME parameter contains a file name which may contain wild

cards.

-o

SELECT --The 0 SELECT parameter is a set specifying the directory objects for which information is to be returned by 0 Oir List. See the file type selection for more information on directory object selection.

o

PTR--The 0 PTR parameter is assigned a pointer to a linked list of records con taining directory information for all specified file objects. In order to have information returned describing it, a file object must meet the following criteria:

It must reside on a volume which matches the volume 10 in 0 NAME.

If the object is a disk file, it must match the file 10 in 0 NAME.

It must belong to one of the types included in 0 SELECT.

II-35

New and Upgraded Standard F acili ties

The linked list contains one record for each file object matcheQ. The records are defined as follows:

o

ListP

=

AD List;

D-List = Record

- 0_ Unit : Integer;

0_ Volume : S tri

R

9[7];

Dans le document USERS' MANUAL SUPPLEMENT (Page 43-48)

Documents relatifs