forked from svenvc/zinc
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolate the FileDirectory and FileStream class references in a single
method to make porting to platforms with different class names easier to maintain.... Issue #4
- Loading branch information
Dale Henrichs
committed
Jul 30, 2012
1 parent
88840db
commit 53a9e63
Showing
22 changed files
with
46 additions
and
36 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/baseNameFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
paths | ||
baseNameFor: fileName | ||
^ (FileDirectory root directoryEntryFor: fileName) name | ||
^ (self fileDirectoryClass root directoryEntryFor: fileName) name |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/defaultDirectory.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
defaults | ||
defaultDirectory | ||
^ FileDirectory default | ||
^ self fileDirectoryClass default |
2 changes: 1 addition & 1 deletion
2
...tory/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/defaultDirectoryPath.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
defaults | ||
defaultDirectoryPath | ||
^ FileDirectory default fullName | ||
^ self fileDirectoryClass default fullName |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/delete..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
paths | ||
delete: path | ||
^ FileDirectory default deleteFileNamed: path | ||
^ self fileDirectoryClass default deleteFileNamed: path |
2 changes: 1 addition & 1 deletion
2
...itory/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/downloadPathTo.for..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/exists..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
paths | ||
exists: path | ||
^ FileDirectory default fileExists: path | ||
^ self fileDirectoryClass default fileExists: path |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/extensionFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
paths | ||
extensionFor: fileName | ||
^ FileDirectory extensionFor: fileName | ||
^ self fileDirectoryClass extensionFor: fileName |
4 changes: 4 additions & 0 deletions
4
...sitory/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fileDirectoryClass.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
private | ||
fileDirectoryClass | ||
|
||
^FileDirectory |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fileNamed.do..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
streams | ||
fileNamed: fileName do: block | ||
^ FileStream | ||
^ self fileDirectoryClass | ||
fileNamed: fileName | ||
do: block |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fileSizeFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
queries | ||
fileSizeFor: fileName | ||
^ (FileDirectory root directoryEntryFor: fileName) fileSize | ||
^ (self fileDirectoryClass root directoryEntryFor: fileName) fileSize |
4 changes: 4 additions & 0 deletions
4
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fileStreamClass.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
private | ||
fileStreamClass | ||
|
||
^FileStream |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fileStreamFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
streams | ||
fileStreamFor: fileName | ||
^ FileStream fileNamed: fileName | ||
^ self fileStreamClass fileNamed: fileName |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/fullNameFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
paths | ||
fullNameFor: fileName | ||
^ (FileDirectory default / fileName) fullName | ||
^ (self fileDirectoryClass default / fileName) fullName |
2 changes: 1 addition & 1 deletion
2
...tory/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/modificationTimeFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
queries | ||
modificationTimeFor: path | ||
^ (FileDirectory default directoryEntryFor: path) modificationDateAndTime | ||
^ (self fileDirectoryClass default directoryEntryFor: path) modificationDateAndTime |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/newFileNamed.do..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
streams | ||
newFileNamed: fileName do: block | ||
^ FileStream | ||
^ self fileDirectoryClass | ||
newFileNamed: fileName | ||
do: block |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/oldFileNamed.do..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
streams | ||
oldFileNamed: fileName do: block | ||
^ FileStream | ||
^ self fileDirectoryClass | ||
oldFileNamed: fileName | ||
do: block |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/class/oldFileStreamFor..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
streams | ||
oldFileStreamFor: fileName | ||
^ FileStream oldFileNamed: fileName | ||
^ self fileDirectoryClass oldFileNamed: fileName |
32 changes: 17 additions & 15 deletions
32
repository/Zinc-FileSystem-Legacy.package/ZnFileSystemUtils.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
{ | ||
"class" : { | ||
"baseNameFor:" : "SvenVanCaekenberghe 7/2/2012 16:10", | ||
"defaultDirectory" : "SvenVanCaekenberghe 7/3/2012 00:37", | ||
"defaultDirectoryPath" : "SvenVanCaekenberghe 7/2/2012 22:36", | ||
"delete:" : "SvenVanCaekenberghe 7/2/2012 16:44", | ||
"baseNameFor:" : "dkh 07/29/2012 17:53", | ||
"defaultDirectory" : "dkh 07/29/2012 17:53", | ||
"defaultDirectoryPath" : "dkh 07/29/2012 17:54", | ||
"delete:" : "dkh 07/29/2012 17:54", | ||
"deleteIfExists:" : "SvenVanCaekenberghe 7/2/2012 16:57", | ||
"downloadPathTo:for:" : "SvenVanCaekenberghe 7/20/2012 13:06", | ||
"exists:" : "SvenVanCaekenberghe 7/2/2012 16:43", | ||
"extensionFor:" : "SvenVanCaekenberghe 7/2/2012 16:01", | ||
"fileNamed:do:" : "SvenVanCaekenberghe 7/2/2012 16:23", | ||
"fileSizeFor:" : "SvenVanCaekenberghe 7/2/2012 16:08", | ||
"fileStreamFor:" : "SvenVanCaekenberghe 7/2/2012 16:13", | ||
"fullNameFor:" : "SvenVanCaekenberghe 7/3/2012 00:34", | ||
"modificationTimeFor:" : "SvenVanCaekenberghe 7/3/2012 00:40", | ||
"newFileNamed:do:" : "SvenVanCaekenberghe 7/3/2012 00:32", | ||
"oldFileNamed:do:" : "SvenVanCaekenberghe 7/2/2012 22:33", | ||
"oldFileStreamFor:" : "SvenVanCaekenberghe 7/2/2012 16:13" }, | ||
"downloadPathTo:for:" : "dkh 07/29/2012 17:54", | ||
"exists:" : "dkh 07/29/2012 17:54", | ||
"extensionFor:" : "dkh 07/29/2012 17:54", | ||
"fileDirectoryClass" : "dkh 07/29/2012 17:55", | ||
"fileNamed:do:" : "dkh 07/29/2012 17:54", | ||
"fileSizeFor:" : "dkh 07/29/2012 17:54", | ||
"fileStreamClass" : "dkh 07/29/2012 17:54", | ||
"fileStreamFor:" : "dkh 07/29/2012 17:55", | ||
"fullNameFor:" : "dkh 07/29/2012 17:55", | ||
"modificationTimeFor:" : "dkh 07/29/2012 17:55", | ||
"newFileNamed:do:" : "dkh 07/29/2012 17:55", | ||
"oldFileNamed:do:" : "dkh 07/29/2012 17:55", | ||
"oldFileStreamFor:" : "dkh 07/29/2012 17:55" }, | ||
"instance" : { | ||
} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/monticello.meta/categories.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SystemOrganization addCategory: #'Zinc-FileSystem-Legacy'! | ||
SystemOrganization addCategory: 'Zinc-FileSystem-Legacy'! |
2 changes: 1 addition & 1 deletion
2
repository/Zinc-FileSystem-Legacy.package/monticello.meta/version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.2' message 'fixed a logic problem in ZnFileSystemUtils class>>#downloadPathTo:for:' id '30263aa4-76ea-4db1-8c10-9fd5eae0e1fb' date '20 July 2012' time '1:14:58 pm' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.1' message 'introduction of the Zinc-FileSystem-Legacy package (including the new ZnFileSystemUtils class) to deal with pre/post FIleSystem introduction in Pharo 2.0 - this is the old code' id '207f349a-f8a3-41da-b78b-8ae9107259a8' date '3 July 2012' time '1:48:48.041 pm' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ()) | ||
(name 'Zinc-FileSystem-Legacy-dkh.3' message 'Zinc Issue #4 (sven)' id '48f4a37c-039c-4b3c-a10f-0d5bcf30dd5e' date '07/29/2012' time '18:01:20' author 'dkh' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.2' message 'fixed a logic problem in ZnFileSystemUtils class>>#downloadPathTo:for:' id '30263aa4-76ea-4db1-8c10-9fd5eae0e1fb' date '07/20/2012' time '13:14:58' author 'SvenVanCaekenberghe' ancestors ((name 'Zinc-FileSystem-Legacy-SvenVanCaekenberghe.1' message 'introduction of the Zinc-FileSystem-Legacy package (including the new ZnFileSystemUtils class) to deal with pre/post FIleSystem introduction in Pharo 2.0 - this is the old code' id '207f349a-f8a3-41da-b78b-8ae9107259a8' date '07/03/2012' time '01:48:48' author 'SvenVanCaekenberghe' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) |