FileText.st
author Jan Vrany <jan.vrany@labware.com>
Wed, 30 Jun 2021 14:07:56 +0100
branchjv
changeset 5481 19d6355dc3e1
parent 4769 89914ccfcf7d
permissions -rw-r--r--
Cherry-picked `Unicode32String` from 48677b66883e: cherry-picked Unicode32String.st from 48677b66883e: * cb05c61f9204: #FEATURE by stefan, Stefan Vogel <sv@exept.de> * 5f6a992925c2: #DOCUMENTATION by stefan, Stefan Vogel <sv@exept.de> * 45176601c636: #BUGFIX by exept, Claus Gittinger <cg@exept.de> * d6f50be034db: #REFACTORING by stefan, Stefan Vogel <sv@exept.de> * ae8ed6040c96: #REFACTORING by stefan, Stefan Vogel <sv@exept.de>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     1
"
4
1f66800df351 *** empty log message ***
claus
parents: 2
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
     3
	      All Rights Reserved
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     4
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
1cf8d1747859 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    11
"
3973
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
    12
"{ Package: 'stx:libbasic2' }"
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
    13
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
    14
"{ NameSpace: Smalltalk }"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    15
55
d1c4bb80d6b3 Text eliminated
claus
parents: 48
diff changeset
    16
StringCollection subclass:#FileText
254
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    17
	instanceVariableNames:'myStream lastLineKnown lastLineOfFile cachedLines cacheLineNr'
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    18
	classVariableNames:''
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    19
	poolDictionaries:''
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    20
	category:'Collections-Text'
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    21
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    22
28
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    23
!FileText class methodsFor:'documentation'!
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    24
31
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    25
copyright
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    26
"
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    27
 COPYRIGHT (c) 1989 by Claus Gittinger
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
    28
	      All Rights Reserved
31
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    29
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    30
 This software is furnished under a license and may be used
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    31
 only in accordance with the terms of that license and with the
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    33
 be provided or otherwise made available to, or used by, any
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    34
 other person.  No title to or ownership of the software is
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    35
 hereby transferred.
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    36
"
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    37
!
e223f3cf2995 *** empty log message ***
claus
parents: 28
diff changeset
    38
28
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    39
documentation
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    40
"
263
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    41
    FileText represents the contents of a text-file and allows
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    42
    transparent access, via #at:, as if the lineStrings were in
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    43
    memory - although, only a small portion of the file is actually
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    44
    present in a cache.
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    45
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    46
    Only the offsets of the text-lines are stored in an internal array
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    47
    to save memory space. The #at: method fetches the line from the file.
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    48
    Individual textlines may be replaced by strings (via #at:put:).
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    49
    The underlying file is NOT updated in this case.
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
    50
28
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    51
    Care should be taken, if the underlying file is rewritten -
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    52
    you have to manually update/flush the pointers.
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    53
    Never rewrite the file using the data from a FileText.
263
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    54
    If you keep a file's contents in a FileText object and want to
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
    55
    rewrite that file, you MUST write to a temporary file first.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
    56
    Otherwise, you will clobber the contents.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
    57
263
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    58
    This is an EXPERIMENTAL class, use at your own risk.
c4628d0d010d commentary
Claus Gittinger <cg@exept.de>
parents: 254
diff changeset
    59
    (If at all, use fileText for huge readonly texts only.)
254
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    60
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    61
    [author:]
cccfa2590e6e documentation
Claus Gittinger <cg@exept.de>
parents: 131
diff changeset
    62
        Claus Gittinger
28
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    63
"
350f8e9493a4 *** empty log message ***
claus
parents: 4
diff changeset
    64
! !
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    65
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    66
!FileText class methodsFor:'instance creation'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    67
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    68
of:aStream
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    69
    "return a new FileText object for the stream aStream"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    70
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    71
    ^ (self new:1) of:aStream
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    72
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    73
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    74
ofFile:aFileName
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    75
    "return a new FileText object for the named file"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    76
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    77
    |aStream|
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    78
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    79
    aStream := FileStream readonlyFileNamed:aFileName.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    80
    aStream isNil ifTrue:[^ nil].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    81
    ^ (self new:1) of:aStream
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    82
! !
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    83
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    84
!FileText methodsFor:'accessing'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    85
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    86
at:index
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    87
    "return the files line at index, as a string"
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    88
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    89
    |entry oldPosition|
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    90
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    91
    (index > lastLineKnown) ifTrue:[
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    92
        self scanUpToLine:index.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    93
        (lastLineOfFile notNil) ifTrue:[
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    94
            (index > lastLineOfFile) ifTrue:[
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    95
                ^ self subscriptBoundsError
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    96
            ]
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    97
        ]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    98
    ].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
    99
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   100
    entry := super at:index.
3973
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
   101
    entry isSingleByteString ifTrue:[^ entry].
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   102
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   103
    cachedLines isNil ifTrue:[
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   104
        cachedLines := Array new:50.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   105
        cacheLineNr := -9999
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   106
    ].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   107
    ((index < cacheLineNr)
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   108
     or:[index >= (cacheLineNr + cachedLines size)]) ifTrue:[
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   109
        oldPosition := myStream position.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   110
        myStream position:entry.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   111
        1 to:(cachedLines size) do:[:cacheIndex|
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   112
            cachedLines at:cacheIndex put:(myStream nextLine)
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   113
        ].
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   114
        myStream position:oldPosition.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   115
        cacheLineNr := index
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   116
    ].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   117
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   118
    ^ cachedLines at:(index - cacheLineNr + 1)
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   119
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   120
    "Modified: 27.4.1996 / 13:32:29 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   121
!
124
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   122
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   123
of:aStream
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   124
    "setup the receiver for lines from aStream"
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   125
124
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   126
    myStream := aStream.
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   127
    lastLineOfFile := nil.
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   128
    lastLineKnown := 0.
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   129
    cachedLines := nil
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   130
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   131
    "Modified: 27.4.1996 / 13:33:26 / cg"
124
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   132
!
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   133
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   134
size
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   135
    "return the number of text-lines - have to scan file the first time"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   136
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   137
    (lastLineOfFile isNil) ifTrue:[
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   138
	self scanUpToEnd
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   139
    ].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   140
    ^ lastLineOfFile
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   141
! !
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   142
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   143
!FileText methodsFor:'enumerating'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   144
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   145
do:aBlock
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   146
    "evaluate aBlock for all lines"
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   147
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   148
    self from:1 to:(self size) do:aBlock
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   149
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   150
    "Modified: 27.4.1996 / 13:33:51 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   151
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   152
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   153
from:index1 to:index2 do:aBlock
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   154
    "evaluate aBlock for all lines from index1 to index2.
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   155
     Must be redefined back since elements are indices into file, 
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   156
     not the elements themselfes"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   157
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   158
    |index "{ Class: SmallInteger }"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   159
     stop  "{ Class: SmallInteger }" |
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   160
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   161
    index := index1.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   162
    stop := index2.
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   163
    [index <= stop] whileTrue:[
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   164
        aBlock value:(self at:index).
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   165
        index := index + 1
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   166
    ]
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   167
266
dfe0cdc571c0 commentary
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   168
    "Modified: 27.4.1996 / 13:34:16 / cg"
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   169
! !
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   170
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   171
!FileText methodsFor:'private'!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   172
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   173
scanUpToEnd
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   174
    "scan myStream up to the end of file"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   175
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   176
    (lastLineOfFile notNil) ifTrue:[^ self].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   177
    [true] whileTrue:[
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   178
	lastLineKnown := lastLineKnown + 1.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   179
	(super size < lastLineKnown) ifTrue:[
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   180
	    super grow:(super size * 2 + 1)
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   181
	].
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   182
	super at:lastLineKnown put:(myStream position).
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   183
	myStream skipLine isNil ifTrue:[
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   184
	    lastLineOfFile := lastLineKnown.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   185
	    ^ self
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   186
	]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   187
    ]
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   188
!
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   189
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   190
scanUpToLine:index
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   191
    "scan myStream up to line index and save line-start-positions"
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   192
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   193
    (lastLineOfFile notNil) ifTrue:[
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   194
	(index > lastLineOfFile) ifTrue:[^ self]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   195
    ].
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   196
    [lastLineKnown <= index] whileTrue:[
48
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   197
	lastLineKnown := lastLineKnown + 1.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   198
	(super size < lastLineKnown) ifTrue:[
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   199
	    super grow:(super size * 2 + 1)
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   200
	].
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   201
	super at:lastLineKnown put:(myStream position).
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   202
	myStream skipLine isNil ifTrue:[
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   203
	    lastLineOfFile := lastLineKnown.
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   204
	    ^ self
18b9353c9d07 *** empty log message ***
claus
parents: 36
diff changeset
   205
	]
0
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   206
    ]
1cf8d1747859 Initial revision
claus
parents:
diff changeset
   207
! !
124
d919bc2f0078 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
   208
131
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
   209
!FileText class methodsFor:'documentation'!
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
   210
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
   211
version
3973
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
   212
    ^ '$Header$'
131
19e548711b65 version at the end
Claus Gittinger <cg@exept.de>
parents: 124
diff changeset
   213
! !
3973
cafe55f1d865 #REFACTORING by stefan
Stefan Vogel <sv@exept.de>
parents: 266
diff changeset
   214