Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.200.mcz
==================== Summary ====================
Name: Multilingual-ul.200
Author: ul
Time: 15 August 2014, 4:11:35.855 am
UUID: 7fac98fd-9abf-4f69-a21f-3e16b5710480
Ancestors: Multilingual-ul.199
Fix the startup of various file streams.
- ensure that MultiByteFileStream's default line end convention is initialized at startup, and only at startup
- don't initialize the stdioFiles more than once at startup
=============== Diff against Multilingual-ul.199 ===============
Item was removed:
- ----- Method: MultiByteFileStream class>>startUp (in category 'class initialization') -----
- startUp
-
- self guessDefaultLineEndConvention.
- !
Item was added:
+ ----- Method: MultiByteFileStream class>>startUp: (in category 'class initialization') -----
+ startUp: resuming
+
+ resuming ifTrue: [ self guessDefaultLineEndConvention ]
+ !
Item was changed:
+ (PackageInfo named: 'Multilingual') postscript: '"Remove CrLfFileStream from the startupList"
+ (Smalltalk classNamed: ''CrLfFileStream'') ifNotNil: [ :class |
+ Smalltalk removeFromStartUpList: class ]'!
- (PackageInfo named: 'Multilingual') postscript: '"Initialize the value of wantsLineEndConversion in all MultiByteFileStreams"
- MultiByteFileStream allSubInstancesDo: [ :each |
- (each instVarNamed: #wantsLineEndConversion) ifNil: [
- each instVarNamed: #wantsLineEndConversion put: false ] ]'!
Levente Uzonyi uploaded a new version of Multilingual to project The Trunk:
http://source.squeak.org/trunk/Multilingual-ul.200.mcz
==================== Summary ====================
Name: Multilingual-ul.200
Author: ul
Time: 15 August 2014, 4:11:35.855 am
UUID: 7fac98fd-9abf-4f69-a21f-3e16b5710480
Ancestors: Multilingual-ul.199
Fix the startup of various file streams.
- ensure that MultiByteFileStream's default line end convention is initialized at startup, and only at startup
- don't initialize the stdioFiles more than once at startup
=============== Diff against Multilingual-ul.199 ===============
Item was removed:
- ----- Method: MultiByteFileStream class>>startUp (in category 'class initialization') -----
- startUp
-
- self guessDefaultLineEndConvention.
- !
Item was added:
+ ----- Method: MultiByteFileStream class>>startUp: (in category 'class initialization') -----
+ startUp: resuming
+
+ resuming ifTrue: [ self guessDefaultLineEndConvention ]
+ !
Item was changed:
+ (PackageInfo named: 'Multilingual') postscript: '"Remove CrLfFileStream from the startupList"
+ (Smalltalk classNamed: ''CrLfFileStream'') ifNotNil: [ :class |
+ Smalltalk removeFromStartUpList: class ]'!
- (PackageInfo named: 'Multilingual') postscript: '"Initialize the value of wantsLineEndConversion in all MultiByteFileStreams"
- MultiByteFileStream allSubInstancesDo: [ :each |
- (each instVarNamed: #wantsLineEndConversion) ifNil: [
- each instVarNamed: #wantsLineEndConversion put: false ] ]'!
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.137.mcz
==================== Summary ====================
Name: Files-eem.137
Author: eem
Time: 14 August 2014, 4:09:05.676 pm
UUID: 833a2130-ce18-454b-8a67-f82db8a299af
Ancestors: Files-eem.136
Fix UnixFileDirectory directoryExists: & fileOrDirectoryExists:
for cases such as 'foo/bar' '../foo/bar' etc.
=============== Diff against Files-eem.136 ===============
Item was changed:
----- Method: UnixFileDirectory>>directoryExists: (in category 'testing') -----
directoryExists: filenameOrPath
+ "Answers true if the directory exists. Overrides to handle the root directory /
+ and relative paths."
+ | fName dir |
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir directoryEntryForName: fName)
+ ifNotNil: [:e| e isDirectory]
+ ifNil: [false]]!
- ^ filenameOrPath = '/' or: [super directoryExists: filenameOrPath]!
Item was changed:
----- Method: UnixFileDirectory>>fileOrDirectoryExists: (in category 'testing') -----
+ fileOrDirectoryExists: filenameOrPath
+ "Answer true if either a file or a directory file of the given name exists. The given name
+ may be either a full path name or a local name within this directory. Overrides to handle
+ the root directory / and relative paths."
+ | fName dir |
- fileOrDirectoryExists: filenameOrPath
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir includesKey: fName) or: [fName isEmpty and: [dir entries size > 1]]]!
- ^ filenameOrPath = '/' or: [super fileOrDirectoryExists: filenameOrPath]!
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.137.mcz
==================== Summary ====================
Name: Files-eem.137
Author: eem
Time: 14 August 2014, 4:09:05.676 pm
UUID: 833a2130-ce18-454b-8a67-f82db8a299af
Ancestors: Files-eem.136
Fix UnixFileDirectory directoryExists: & fileOrDirectoryExists:
for cases such as 'foo/bar' '../foo/bar' etc.
=============== Diff against Files-eem.136 ===============
Item was changed:
----- Method: UnixFileDirectory>>directoryExists: (in category 'testing') -----
directoryExists: filenameOrPath
+ "Answers true if the directory exists. Overrides to handle the root directory /
+ and relative paths."
+ | fName dir |
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir directoryEntryForName: fName)
+ ifNotNil: [:e| e isDirectory]
+ ifNil: [false]]!
- ^ filenameOrPath = '/' or: [super directoryExists: filenameOrPath]!
Item was changed:
----- Method: UnixFileDirectory>>fileOrDirectoryExists: (in category 'testing') -----
+ fileOrDirectoryExists: filenameOrPath
+ "Answer true if either a file or a directory file of the given name exists. The given name
+ may be either a full path name or a local name within this directory. Overrides to handle
+ the root directory / and relative paths."
+ | fName dir |
- fileOrDirectoryExists: filenameOrPath
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir includesKey: fName) or: [fName isEmpty and: [dir entries size > 1]]]!
- ^ filenameOrPath = '/' or: [super fileOrDirectoryExists: filenameOrPath]!
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.137.mcz
==================== Summary ====================
Name: Files-eem.137
Author: eem
Time: 14 August 2014, 4:09:05.676 pm
UUID: 833a2130-ce18-454b-8a67-f82db8a299af
Ancestors: Files-eem.136
Fix UnixFileDirectory directoryExists: & fileOrDirectoryExists:
for cases such as 'foo/bar' '../foo/bar' etc.
=============== Diff against Files-eem.136 ===============
Item was changed:
----- Method: UnixFileDirectory>>directoryExists: (in category 'testing') -----
directoryExists: filenameOrPath
+ "Answers true if the directory exists. Overrides to handle the root directory /
+ and relative paths."
+ | fName dir |
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir directoryEntryForName: fName)
+ ifNotNil: [:e| e isDirectory]
+ ifNil: [false]]!
- ^ filenameOrPath = '/' or: [super directoryExists: filenameOrPath]!
Item was changed:
----- Method: UnixFileDirectory>>fileOrDirectoryExists: (in category 'testing') -----
+ fileOrDirectoryExists: filenameOrPath
+ "Answer true if either a file or a directory file of the given name exists. The given name
+ may be either a full path name or a local name within this directory. Overrides to handle
+ the root directory / and relative paths."
+ | fName dir |
- fileOrDirectoryExists: filenameOrPath
- "Handles the special case of testing for the root dir: there isn't a
- possibility to express the root dir as full pathname like '/foo'."
+ filenameOrPath = '/' ifTrue:
+ [^true].
+
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
+ fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse:
+ [FileDirectory on: (filePath first = $/
+ ifTrue: [filePath]
+ ifFalse: [self fullName, '/', filePath])]].
+
+ ^dir exists
+ and: [(dir includesKey: fName) or: [fName isEmpty and: [dir entries size > 1]]]!
- ^ filenameOrPath = '/' or: [super fileOrDirectoryExists: filenameOrPath]!