[Newbies] Squeak equivalent for Filename

Doug Edmunds dae at douglasedmunds.com
Sun Dec 23 18:02:17 UTC 2007

Bert Freudenberg wrote:
> On Dec 23, 2007, at 7:51 , Doug Edmunds wrote:
>> Cincom VisualWorks has this code to read the names of the
>> files in a directory:
>> (Filename named: '.') directoryContents   "returns an array of string"
>> What is the equivalent in Squeak?
> (FileDirectory on: '.') fileAndDirectoryNames
Didn't work. I get a walkback
"Error: Fully qualified path expected"

I am using Windows XP, and bumped into this:

DosFileDirectory>>>setPathName: pathString
	"Ensure pathString is absolute - relative directories aren't supported
on all platforms."

	(pathString isEmpty
		or: [pathString first = $\
			or: [pathString size >= 2 and: [pathString second = $: and:
[pathString first isLetter]]]])
				ifTrue: [^ super setPathName: pathString].

	self error: 'Fully qualified path expected'


More information about the Beginners mailing list