equal
deleted
inserted
replaced
|
1 " |
|
2 COPYRIGHT (c) 1992-93 by Claus Gittinger |
|
3 All Rights Reserved |
|
4 |
|
5 This software is furnished under a license and may be used |
|
6 only in accordance with the terms of that license and with the |
|
7 inclusion of the above copyright notice. This software may not |
|
8 be provided or otherwise made available to, or used by, any |
|
9 other person. No title to or ownership of the software is |
|
10 hereby transferred. |
|
11 " |
|
12 |
|
13 Object subclass:#Filename |
|
14 instanceVariableNames:'name' |
|
15 classVariableNames:'' |
|
16 poolDictionaries:'' |
|
17 category:'ST-80 compatibility'! |
|
18 |
|
19 Filename comment:' |
|
20 |
|
21 COPYRIGHT (c) 1992-93 by Claus Gittinger |
|
22 All Rights Reserved |
|
23 |
|
24 Filenames for ST-80 compatibility. Only the minimum is implemented |
|
25 here to make some PD programs happy - I dont know what else there |
|
26 is in ST-80. |
|
27 |
|
28 %W% %E% |
|
29 '! |
|
30 |
|
31 !Filename class methodsFor:'instance creation'! |
|
32 |
|
33 named:aString |
|
34 ^ (self basicNew) name:aString |
|
35 ! ! |
|
36 |
|
37 !Filename methodsFor:'converting'! |
|
38 |
|
39 asString |
|
40 ^ name |
|
41 ! |
|
42 |
|
43 asFilename |
|
44 ^ self |
|
45 ! ! |
|
46 |
|
47 !Filename methodsFor:'private accessing'! |
|
48 |
|
49 name:aString |
|
50 name := aString |
|
51 ! ! |
|
52 |
|
53 !Filename methodsFor:'file access'! |
|
54 |
|
55 exists |
|
56 "return true, if such a file exists" |
|
57 |
|
58 ^ OperatingSystem isValidPath:name |
|
59 ! |
|
60 |
|
61 fileIn |
|
62 ^ (FileStream readonlyFileNamed:name) fileIn |
|
63 ! |
|
64 |
|
65 readStream |
|
66 ^ FileStream readonlyFileNamed:name |
|
67 ! |
|
68 |
|
69 writeStream |
|
70 ^ FileStream newFileNamed:name |
|
71 ! ! |