[Pkg] The Trunk: Files-eem.115.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Dec 16 21:39:31 UTC 2011
Eliot Miranda uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-eem.115.mcz
==================== Summary ====================
Name: Files-eem.115
Author: eem
Time: 16 December 2011, 1:39:14.822 pm
UUID: f6f5744a-625b-4506-b2be-2e0276a4b0cb
Ancestors: Files-ul.114
Fix error in FileDirectory default directoryExists: FileDirectory default fullName, '/.'
=============== Diff against Files-ul.114 ===============
Item was added:
+ ----- Method: AcornFileDirectory class>>currentDirectoryNickname (in category 'platform specific') -----
+ currentDirectoryNickname
+ "Answer the nick-name for the current directory (e.g. '.' on Unix and Windows).
+ Who knows what this is on Acorn?"
+ ^nil!
Item was added:
+ ----- Method: AcornFileDirectory class>>parentDirectoryNickname (in category 'platform specific') -----
+ parentDirectoryNickname
+ "Answer the nick-name for the parent directory (e.g. '..' on Unix and Windows).
+ Who knows what this is on Acorn?"
+ ^nil!
Item was added:
+ ----- Method: FileDirectory class>>currentDirectoryNickname (in category 'platform specific') -----
+ currentDirectoryNickname
+ "Answer the nick-name for the current directory (e.g. '.' on Unix and Windows).
+ Answer the common default."
+ ^'.'!
Item was added:
+ ----- Method: FileDirectory class>>parentDirectoryNickname (in category 'platform specific') -----
+ parentDirectoryNickname
+ "Answer the nick-name for the parent directory (e.g. '..' on Unix and Windows).
+ Answer the common default."
+ ^'..'!
Item was changed:
----- Method: FileDirectory>>directoryExists: (in category 'testing') -----
directoryExists: filenameOrPath
"Answer true if a directory of the given name exists. The given name may be either a full path name or a local directory within this directory."
"FileDirectory default directoryExists: FileDirectory default pathName"
| fName dir |
+ DirectoryClass
+ splitName: filenameOrPath
+ to: [:filePath :name |
- DirectoryClass splitName: filenameOrPath to:
- [:filePath :name |
fName := name.
+ dir := filePath isEmpty
+ ifTrue: [self]
+ ifFalse: [self directoryNamed: filePath]].
- filePath isEmpty
- ifTrue: [dir := self]
- ifFalse: [dir := self directoryNamed: filePath]].
+ ^dir exists
+ and: [self class currentDirectoryNickname = fName
+ or: [self class parentDirectoryNickname = fName
+ or: [self isCaseSensitive
+ ifTrue:[dir directoryNames includes: fName]
+ ifFalse:[dir directoryNames anySatisfy: [:name| name sameAs: fName]]]]]!
- ^dir exists and: [
- self isCaseSensitive
- ifTrue:[dir directoryNames includes: fName]
- ifFalse:[dir directoryNames anySatisfy: [:name| name sameAs: fName]]].
- !
More information about the Packages
mailing list