Issue 5935 in pharo: String #asFile and #asDirectory

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5935 in pharo: String #asFile and #asDirectory

pharo
Status: Accepted
Owner: [hidden email]
Labels: Type-Cleanup Milestone-2.0 Difficulty-Easy

New issue 5935 by [hidden email]: String #asFile and #asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

These methods don't make sense. We are not returning files and directories,  
but references. There may not be a file there at all. They are simply a  
little shorter than #asFileReference, but at the cost of added complexity  
and confusion.

If anything, maybe they should call ensure* and guarantee that a file or  
directory is created...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5935 in pharo: String #asFile and #asDirectory

pharo
Updates:
        Labels: Filesystem

Comment #1 on issue 5935 by [hidden email]: String #asFile and  
#asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5935 in pharo: String #asFile and #asDirectory

pharo

Comment #2 on issue 5935 by [hidden email]: String #asFile and  
#asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

"If anything, maybe they should call ensure*"

On second thought, FileReference already has ensure*. I vote to simply  
ditch asFile and asDirectory.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5935 in pharo: String #asFile and #asDirectory

pharo

Comment #3 on issue 5935 by [hidden email]: String #asFile and  
#asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

maybe you're right :) I just added them to have something which is less  
cumbersome to write ( I am a very lazy person) :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5935 in pharo: String #asFile and #asDirectory

pharo
Updates:
        Status: FixReviewNeeded
        Cc: [hidden email]

Comment #4 on issue 5935 by [hidden email]: String #asFile and  
#asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

Of course, I am the same way! Yet in this case, it seems the confusion  
outweighs the keystroke savings :)

This will probably have to be merged unless it is integrated very quickly.  
The changes are simple, but touch a lot of packages...
Fix in inbox: Name:  
SLICE-Issue-5935-String-asFile-and-asDirectory-SeanDeNigris.1
Dependencies: FileSystem-Tests-Core-SeanDeNigris.30,  
Graphics-Files-SeanDeNigris.28, Monticello-SeanDeNigris.634,  
System-Changes-SeanDeNigris.153, Polymorph-Widgets-SeanDeNigris.666,  
Files-SeanDeNigris.ducasse.264, Network-Url-SeanDeNigris.72,  
ScriptLoader20-SeanDeNigris.240, FileSystem-Core-SeanDeNigris.37,  
Tools-SeanDeNigris.893, CompressionTests-SeanDeNigris.15,  
Multilingual-Tests-SeanDeNigris.16, Gofer-Core-SeanDeNigris.153,  
System-Support-SeanDeNigris.662, Graphics-Tests-SeanDeNigris.26

Motivation: These methods don't make sense. We are not returning files and  
directories, but references. There may not be a file there at all. They are  
simply a little shorter than #asFileReference, but at the cost of added  
complexity and confusion.

* Change all senders of #asDirectory (except those in Compression which are  
sending #asDirectory to Zip*Member) and #asFile to send #asFileReference


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5935 in pharo: String #asFile and #asDirectory

pharo
Updates:
        Status: Integrated

Comment #5 on issue 5935 by [hidden email]: String #asFile and  
#asDirectory
http://code.google.com/p/pharo/issues/detail?id=5935

in 2.0 207


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker