blob: c0f7028b303ece081578c08fada858c66ea1680c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
--Copyright: Matra Datavision 1992,1993
-- File: OSD_Disk.cdl
-- Created: May 27 1992
-- Author: Stephan GARNAUD (ARM)
-- <sga@sparc4>
class Disk from OSD
---Purpose: Disk management
uses Error, Path, CString from Standard, AsciiString from TCollection
raises OSDError
is
Create returns Disk;
---Purpose: Creates a disk object.
-- This is used only when a class contains a Disk field.
-- By default, its name is initialized to current working disk.
---Level: Public
Create (Name : Path) returns Disk;
---Purpose: Initializes the object Disk with the disk name
-- associated to the OSD_Path.
---Level: Public
Create (PathName : CString) returns Disk;
---Purpose: Initializes the object Disk with <PathName>.
-- <PathName> specifies any file within the mounted
-- file system.
-- Example : OSD_Disk myDisk ("/tmp")
-- Initializes a disk object with the mounted
-- file associated to /tmp.
---Level: Public
Name (me ) returns Path is static;
---Purpose: Returns disk name of <me>.
---Level: Public
SetName (me : in out; Name : Path) is static ;
---Purpose: Instantiates <me> with <Name>.
---Level: Public
DiskSize(me : in out) returns Integer is static ;
---Purpose: Returns total disk capacity in 512 bytes blocks.
---Level: Advanced
DiskFree(me : in out) returns Integer is static ;
---Purpose: Returns free available 512 bytes blocks on disk.
---Level: Advanced
DiskQuota(me : in out) returns Integer is static ;
---Purpose: Returns user's disk quota (in Bytes).
---Level: Advanced
SetDiskQuota(me : in out; QuotaSize : Integer) is static ;
---Purpose: Sets user's disk quota (in Bytes).
-- Warning: Needs system administrator privilege.
---Level: Advanced
SetQuotaOn(me : in out) is static;
---Purpose: Activates user's disk quota
-- Warning: Needs system administrator privilege.
---Level: Advanced
SetQuotaOff(me : in out) is static;
---Purpose: Deactivates user's disk quota
-- Warning: Needs system administrator privilege.
---Level: Advanced
Failed (me) returns Boolean is static ;
---Purpose: Returns TRUE if an error occurs
---Level: Public
Reset (me : in out) is static ;
---Purpose: Resets error counter to zero
---Level: Public
Perror (me : in out)
---Purpose: Raises OSD_Error
---Level: Public
raises OSDError is static ;
Error (me) returns Integer is static;
---Purpose: Returns error number if 'Failed' is TRUE.
---Level: Public
fields
DiskName : AsciiString;
myQuotaSize: Integer;
myError : Error;
end Disk from OSD;
|