|
From: | Paolo Bonzini |
Subject: | Re: [Help-smalltalk] FilePath creation |
Date: | Mon, 08 Jun 2009 09:31:44 +0200 |
User-agent: | Thunderbird 2.0.0.17 (X11/20081009) |
Stephen wrote:
Ah, how does one create a FilePath instance?I can't find any class "instance creation" methods in the FilePath documentation.
FilePath is abstract, you use "File name: 'aaa'" or "'xxx' asFile" or "File path: 'bbb'".
The difference between #name: and the others is that #name: forces the File to be on an absolute path. Example:
Directory working: '/usr/bin'. a := File name: 'gst'. " ==> <File /usr/bin/gst>" b := File path: 'gst'. " ==> <File gst> Directory working: Directory home. a size printNl. b size printNl. "No such flie or directory" Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |