0024784: Move documentation in CDL files to proper location
[occt.git] / src / OSD / OSD_FileNode.cdl
CommitLineData
b311480e 1-- Created on: 2024-03-15
2-- Created by: Stephan GARNAUD (ARM)
3-- Copyright (c) 1998-1999 Matra Datavision
973c2be1 4-- Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5--
973c2be1 6-- This file is part of Open CASCADE Technology software library.
b311480e 7--
d5f74e42 8-- This library is free software; you can redistribute it and/or modify it under
9-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 10-- by the Free Software Foundation, with special exception defined in the file
11-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12-- distribution for complete text of the license and disclaimer of any warranty.
b311480e 13--
973c2be1 14-- Alternatively, this file may be used under the terms of Open CASCADE
15-- commercial license or contractual agreement.
7fd59977 16
17deferred class FileNode from OSD
18
19 ---Purpose: A class for 'File' and 'Directory' grouping common
ff8178ef 20 -- methods (file/directory manipulation tools).
7fd59977 21 -- The "file oriented" name means files or directories which are
22 -- in fact hard coded as files.
23
24uses Protection, Date, Path, OpenMode, Error, AsciiString from TCollection
25raises OSDError, ProgramError
26
27
28is
29 Initialize;
30 ---Purpose: Creates FileNode object
31 -- This is to be used with SetPath .
32 -- Allocate space for the file name and initializes this
33 -- name to an empty name.
34 ---Level: Internal
35
36 Initialize (Name : Path )
37 ---Purpose: Instantiates the object FileNode storing its name.
38 -- If a name is not found, it raises a program error.
39 ---Level: Internal
40 raises ProgramError;
41
42 Path(me ; Name : out Path) is static;
43 ---Purpose: Gets file name and path.
44 ---Level: Public
45
46 SetPath(me : in out; Name : Path)
47 ---Purpose: Sets file name and path.
48 -- If a name is not found, it raises a program error.
49 ---Level: Public
50 raises ProgramError is static;
51
52 Exists ( me : in out ) returns Boolean
53 ---Purpose: Returns TRUE if <me> exists.
54 ---Level: Public
55 raises ProgramError is static;
56
57 Remove (me : in out)
58 ---Purpose: Erases the FileNode from directory
59 ---Level: Public
60 raises ProgramError is static;
61
62 Move (me : in out; NewPath : Path)
63 ---Purpose: Moves <me> into another directory
64 ---Level: Public
65 raises ProgramError is static;
66
67 Copy (me : in out; ToPath : Path )
68 ---Purpose: Copies <me> to another FileNode
69 ---Level: Public
70 raises ProgramError is static;
71
72 Protection (me : in out) returns Protection
73 ---Purpose: Returns access mode of <me>.
74 ---Level: Public
75 raises ProgramError is static;
76
77 SetProtection (me : out; Prot : Protection)
78 ---Purpose: Changes protection of the FileNode
79 ---Level: Public
80 raises ProgramError is static;
81
82 AccessMoment (me : in out) returns Date
83 ---Purpose: Returns last write access.
84 -- On UNIX, AccessMoment and CreationMoment return the
85 -- same value.
86 ---Level: Public
87 raises ProgramError is static;
88
89 CreationMoment (me : in out) returns Date
90 ---Purpose: Returns creation date.
91 -- On UNIX, AccessMoment and CreationMoment return the
92 -- same value.
93 ---Level: Public
94 raises ProgramError is static;
95
96 UserId (me : in out) returns Integer
97 ---Purpose: Returns User Identification.
98 ---Level: Public
99 raises ProgramError is static;
100
101 GroupId (me : in out) returns Integer
102 ---Purpose: Returns Group Identification.
103 ---Level: Public
104 raises ProgramError is static;
105
106 Failed (me) returns Boolean is static;
107 ---Purpose: Returns TRUE if an error occurs
108 ---Level: Public
109
110 Reset (me : in out) is static;
111 ---Purpose: Resets error counter to zero
112 ---Level: Public
113
114 Perror (me : in out)
115 ---Purpose: Raises OSD_Error
116 ---Level: Public
117 raises OSDError is static;
118
119 Error (me) returns Integer is static;
120 ---Purpose: Returns error number if 'Failed' is TRUE.
121 ---Level: Public
122
123 fields
124 myPath : Path is protected; -- system independent path name
7fd59977 125 myError : Error is protected;
126end FileNode from OSD;
127
128
129