[squeak-dev] List Windows shares from Squeak?

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

[squeak-dev] List Windows shares from Squeak?

Elod Kironsky-2
Hi!

I would like to list the window shares for a host in the network, from Squeak ofc ;) Is it possible? Is there any abstraction/package to work with shares/samba?

Thanks in advance,

Elod

Elod Kironsky
Software Developer
AVG Technologies
Email: [hidden email]
www.avg.com
www.avg.cz


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: List Windows shares from Squeak?

Andreas.Raab
You can work with shares simply by accessing them via:

        FileDirectory on: '\\share\path\'.

However, listing shares is currently not supported since I have been
unable to find a way of doing that efficiently (i.e., without locking up
the VM for 10 or more seconds). If you know of a cheap way of listing
shares I would absolutely add that feature!

Cheers,
   - Andreas

Elod Kironský wrote:

> Hi!
>
> I would like to list the window shares for a host in the network, from Squeak ofc ;) Is it possible? Is there any abstraction/package to work with shares/samba?
>
> Thanks in advance,
>
> Elod
>
> Elod Kironsky
> Software Developer
> AVG Technologies
> Email: [hidden email]
> www.avg.com
> www.avg.cz
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: List Windows shares from Squeak?

Claus Kick
Andreas Raab wrote:

> However, listing shares is currently not supported since I have been
> unable to find a way of doing that efficiently (i.e., without locking up
> the VM for 10 or more seconds). If you know of a cheap way of listing
> shares I would absolutely add that feature!
>
> Cheers,
>   - Andreas

Hello Andreas,

in VW you can do something like:

|proc str |
proc := WinProcess new.
str := proc executeSingleCommand:   'net use'.

So, I guess something like:

ExternalOSProcess concreteClass command: 'net use'

should to the trick, but unfortunately it does not work (and I dont know
why that is).

"net use" lists all shares, however you would have to parse the output a
little bit first. Should be faster than 10 seconds or so :)

Best Regards,

Claus