Ooops: use System.Serializable instead of System.SerializableAttribute and System...
[mono.git] / mcs / class / Microsoft.VisualBasic / Microsoft.VisualBasic / VBFile.cs
1 /*
2  * Copyright (c) 2002-2003 Mainsoft Corporation.
3  * Copyright (C) 2004 Novell, Inc (http://www.novell.com)
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  * 
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  * 
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23
24 using Microsoft.VisualBasic;
25
26 using System;
27 using System.IO;
28
29
30 interface VBFile
31 {
32         void closeFile(); 
33    
34         bool  endOfFile();
35     
36         bool  isExist();
37     
38         void get(out bool value,long recordNumber); 
39
40         void get(out byte value,long recordNumber);
41
42         void get(out short value,long recordNumber);
43
44         void get(out char value,long recordNumber);
45
46         void get(out int value, long recordNumber);
47
48         void get(out long value, long recordNumber);
49
50         void get(out float value,long recordNumber);
51
52         void get(out double value,long recordNumber);
53     
54         void get(out Decimal value,long recordNumber);
55     
56         void get(out DateTime value,long recordNumber);
57     
58         void get(ref Array Value,long RecordNumber,bool  ArrayIsDynamic,
59                  bool  StringIsFixedLength); 
60
61         void get(ref string value,long recordNumber,bool  bIgnored); 
62
63         void get(ref object value,long recordNumber);    
64   
65         string getFullPath();
66    
67         FileMode getMode();
68     
69         long getPosition();
70     
71         void setPosition(long pos);
72     
73         long getLength();
74     
75         Stream getFileStream();  
76    
77         void writeLine(Object[] arr);
78     
79         void write(Object[] arr);
80     
81         void printLine(Object[] arr);
82     
83         void print(Object[] arr);    
84    
85         void put(bool  value,long recordNumber);
86
87         void put(byte value, long recordNumber);
88
89         void put(short value, long recordNumber);
90
91         void put( char value, long recordNumber);
92
93         void put(int value, long recordNumber);
94
95         void put(long value, long recordNumber);
96
97         void put(float value, long recordNumber);
98
99         void put(double value, long recordNumber);
100     
101         void put(Decimal value, long recordNumber);
102
103         void put(string value,long recordNumber,bool  stringIsFixedLength);
104     
105         void put(Object Value,long RecordNumber,
106                  bool  ArrayIsDynamic,bool  StringIsFixedLength); 
107
108         void put(DateTime value,long recordNumber);
109     
110     
111         bool  canWrite();
112     
113         bool  canRead();
114     
115         void Input(out bool Value);
116
117         void Input(out byte Value);
118
119         void Input(out short Value);
120
121         void Input(out int Value);
122
123         void Input(out long Value);
124
125         void Input(out char Value);
126
127         void Input(out float Value);
128
129         void Input(out double Value);
130
131         void Input(out Decimal Value);
132
133         void Input(ref object Value, bool  isString);
134
135         void Input(out string Value);
136     
137         string InputString(int count);
138
139         string Input(string val);
140
141         void Input(out DateTime Value);
142     
143         FileAttributes getAttributes();
144     
145         void setAttributes(FileAttributes fileAttr);
146     
147         long seek();
148     
149         void seek(long position);
150     
151         bool  isEndOfFile();
152     
153         string readLine();
154     
155         void width(int fileNumber, int RecordWidth);
156      
157        
158 }