pharo-users@lists.pharo.org

Any question about pharo is welcome

View all threads

Code not showing all items in directory

DP
David Pennington
Sun, Mar 7, 2021 7:58 PM

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON  items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
	do: [ :each | 
		nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection. bucketList | top fileDirectory bucketList nameList | top := FileSystem disk workingDirectory. fileDirectory := top / 'TinyKVDB' / self bucket. bucketList := fileDirectory children. nameList := SortedCollection new. bucketList do: [ :each | nameList add: each asString ] . ^ nameList The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here? David TotallyObjects
SD
Stéphane Ducasse
Sun, Mar 7, 2021 8:01 PM

can you show us your file names?

and a ls of your directory?

On 7 Mar 2021, at 20:58, David Pennington david@totallyobjects.com wrote:

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON  items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
	do: [ :each | 
		nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

can you show us your file names? and a ls of your directory? > On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com> wrote: > > Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection. > > bucketList > > > | top fileDirectory bucketList nameList | > top := FileSystem disk workingDirectory. > fileDirectory := top / 'TinyKVDB' / self bucket. > bucketList := fileDirectory children. > nameList := SortedCollection new. > bucketList > do: [ :each | > nameList add: each asString ] . > ^ nameList > > The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here? > > David > TotallyObjects -------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
DP
David Pennington
Sun, Mar 7, 2021 8:35 PM

Not sure what you mean by ls. Here is the directory. The file called jo is not appearing in the list.

On 7 Mar 2021, at 20:01, Stéphane Ducasse stephane.ducasse@inria.fr wrote:

can you show us your file names?

and a ls of your directory?

On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com mailto:david@totallyobjects.com> wrote:

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON  items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
	do: [ :each | 
		nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects


Stéphane Ducasse
http://stephane.ducasse.free.fr http://stephane.ducasse.free.fr/ / http://www.pharo.org http://www.pharo.org/
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Not sure what you mean by ls. Here is the directory. The file called jo is not appearing in the list. > On 7 Mar 2021, at 20:01, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote: > > can you show us your file names? > > and a ls of your directory? > >> On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com <mailto:david@totallyobjects.com>> wrote: >> >> Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection. >> >> bucketList >> >> >> | top fileDirectory bucketList nameList | >> top := FileSystem disk workingDirectory. >> fileDirectory := top / 'TinyKVDB' / self bucket. >> bucketList := fileDirectory children. >> nameList := SortedCollection new. >> bucketList >> do: [ :each | >> nameList add: each asString ] . >> ^ nameList >> >> The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here? >> >> David >> TotallyObjects > > -------------------------------------------- > Stéphane Ducasse > http://stephane.ducasse.free.fr <http://stephane.ducasse.free.fr/> / http://www.pharo.org <http://www.pharo.org/> > 03 59 35 87 52 > Assistant: Aurore Dalle > FAX 03 59 57 78 50 > TEL 03 59 35 86 16 > S. Ducasse - Inria > 40, avenue Halley, > Parc Scientifique de la Haute Borne, Bât.A, Park Plaza > Villeneuve d'Ascq 59650 > France >
D
David@totallyobjects.com
Sun, Mar 7, 2021 8:46 PM

Sorry just seen what you mean. The screen shot is all I can do.

Sent from my Huawei tablet

-------- Original Message --------
Subject: [Pharo-users] Re: Code not showing all items in directory
From: Stéphane Ducasse
To: Any question about pharo is welcome
CC:

can you show us your file names?

and a ls of your directory?

On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com> wrote:

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
do: [ :each |
nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects


Stéphane Ducasse

http://stephane.ducasse.free.fr / http://www.pharo.org

03 59 35 87 52

Assistant: Aurore Dalle

FAX 03 59 57 78 50

TEL 03 59 35 86 16

S. Ducasse - Inria

40, avenue Halley,

Parc Scientifique de la Haute Borne, Bât.A, Park Plaza

Villeneuve d'Ascq 59650

France

SD
Stéphane Ducasse
Sun, Mar 7, 2021 9:04 PM

You can put a conditional halt in the loading logic

Halt if: [ name = ‘jo’]

and let us know.
Did you check the rights of these files?
Are they symbolic links?
Because FileSystem has sometimes surprising behavior with symbolic links.

S.

On 7 Mar 2021, at 21:35, David Pennington <david@totallyobjects.com mailto:david@totallyobjects.com> wrote:

Not sure what you mean by ls. Here is the directory. The file called jo is not appearing in the list.

<member dir.png>

On 7 Mar 2021, at 20:01, Stéphane Ducasse <stephane.ducasse@inria.fr mailto:stephane.ducasse@inria.fr> wrote:

can you show us your file names?

and a ls of your directory?

On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com mailto:david@totallyobjects.com> wrote:

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON  items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
	do: [ :each | 
		nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects


Stéphane Ducasse
http://stephane.ducasse.free.fr http://stephane.ducasse.free.fr/ / http://www.pharo.org http://www.pharo.org/
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


Stéphane Ducasse
http://stephane.ducasse.free.fr / http://www.pharo.org
03 59 35 87 52
Assistant: Aurore Dalle
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

You can put a conditional halt in the loading logic Halt if: [ name = ‘jo’] and let us know. Did you check the rights of these files? Are they symbolic links? Because FileSystem has sometimes surprising behavior with symbolic links. S. > On 7 Mar 2021, at 21:35, David Pennington <david@totallyobjects.com <mailto:david@totallyobjects.com>> wrote: > > Not sure what you mean by ls. Here is the directory. The file called jo is not appearing in the list. > > <member dir.png> > > > > >> On 7 Mar 2021, at 20:01, Stéphane Ducasse <stephane.ducasse@inria.fr <mailto:stephane.ducasse@inria.fr>> wrote: >> >> can you show us your file names? >> >> and a ls of your directory? >> >>> On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com <mailto:david@totallyobjects.com>> wrote: >>> >>> Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection. >>> >>> bucketList >>> >>> >>> | top fileDirectory bucketList nameList | >>> top := FileSystem disk workingDirectory. >>> fileDirectory := top / 'TinyKVDB' / self bucket. >>> bucketList := fileDirectory children. >>> nameList := SortedCollection new. >>> bucketList >>> do: [ :each | >>> nameList add: each asString ] . >>> ^ nameList >>> >>> The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here? >>> >>> David >>> TotallyObjects >> >> -------------------------------------------- >> Stéphane Ducasse >> http://stephane.ducasse.free.fr <http://stephane.ducasse.free.fr/> / http://www.pharo.org <http://www.pharo.org/> >> 03 59 35 87 52 >> Assistant: Aurore Dalle >> FAX 03 59 57 78 50 >> TEL 03 59 35 86 16 >> S. Ducasse - Inria >> 40, avenue Halley, >> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza >> Villeneuve d'Ascq 59650 >> France >> > -------------------------------------------- Stéphane Ducasse http://stephane.ducasse.free.fr / http://www.pharo.org 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France
D
David@totallyobjects.com
Sun, Mar 7, 2021 9:35 PM

I will do that tomorrow. I can't understand why there would be any difference between the files. They are generated in VisualAge from VAST Object dumps into json in a simple loop on Windows 10 and copied across to the mac using the clipboard (the Windows machine is on MSRemoteAccess so cut and paste works). I have previously moved other objects across in the same way 320 at one go, so I cannot see why there should be any difference

Sent from my Huawei tablet

-------- Original Message --------
Subject: [Pharo-users] Re: Code not showing all items in directory
From: Stéphane Ducasse
To: Any question about pharo is welcome
CC:

You can put a conditional halt in the loading logic

Halt if: [ name = ‘jo’]

and let us know.

Did you check the rights of these files?

Are they symbolic links?

Because FileSystem has sometimes surprising behavior with symbolic links.

S.

On 7 Mar 2021, at 21:35, David Pennington <david@totallyobjects.com> wrote:

Not sure what you mean by ls. Here is the directory. The file called jo is not appearing in the list.

<member dir.png>

On 7 Mar 2021, at 20:01, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:

can you show us your file names?

and a ls of your directory?

On 7 Mar 2021, at 20:58, David Pennington <david@totallyobjects.com> wrote:

Hi there. I am a long time user of VAST recently moved to Pharo. I have a directory that contains 20 JSON items. I am using the following code to load all of them into a collection.

bucketList

| top fileDirectory bucketList nameList |
top := FileSystem disk workingDirectory.
fileDirectory := top / 'TinyKVDB' / self bucket.
bucketList := fileDirectory children.
nameList := SortedCollection new.
bucketList
do: [ :each |
nameList add: each asString ] .
^ nameList

The code is only loading 18 of the items in the directory. I cannot see that there is anything different between there 18 and the other 2. Can anyone give me some clues here?

David
TotallyObjects


Stéphane Ducasse

http://stephane.ducasse.free.fr / http://www.pharo.org

03 59 35 87 52

Assistant: Aurore Dalle

FAX 03 59 57 78 50

TEL 03 59 35 86 16

S. Ducasse - Inria

40, avenue Halley,

Parc Scientifique de la Haute Borne, Bât.A, Park Plaza

Villeneuve d'Ascq 59650

France


Stéphane Ducasse

http://stephane.ducasse.free.fr / http://www.pharo.org

03 59 35 87 52

Assistant: Aurore Dalle

FAX 03 59 57 78 50

TEL 03 59 35 86 16

S. Ducasse - Inria

40, avenue Halley,

Parc Scientifique de la Haute Borne, Bât.A, Park Plaza

Villeneuve d'Ascq 59650

France

SP
Sean P. DeNigris
Thu, Mar 11, 2021 6:41 PM

Long Haired David wrote

bucketList := fileDirectory children.

How many items are in bucketList?


Cheers,
Sean

Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Long Haired David wrote > bucketList := fileDirectory children. How many items are in `bucketList`? ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html