Hi, I want to create a symbolic link via Pharo. But I don't know how, I found methods named #isSymlink but none for creation of symbolic links. Can we create a symbolic link via Pharo ? Thibault
right now, you canât⦠btw, even #isSymlink method is currently broken (I coded a replacement with UFFI but while making it work with linux I broke it with mac⦠and no time yet to finish it :( ) but I suppose also creating symlinks is something we can add soon :) Esteban
On 20 Jun 2016, at 16:22, Thibault ARLOING <thibault.arloing@hotmail.fr> wrote:
Hi,
I want to create a symbolic link via Pharo. But I don't know how, I found methods named #isSymlink but none for creation of symbolic links.
Can we create a symbolic link via Pharo ?
Thibault
Ok, I will create my symbolic links with a bash script until it is available in Pharo [ð] Thanks Thibault ________________________________ De : Pharo-users <pharo-users-bounces@lists.pharo.org> de la part de Esteban Lorenzano <estebanlm@gmail.com> Envoyé : lundi 20 juin 2016 16:51 à : Any question about pharo is welcome Objet : Re: [Pharo-users] Symbolic links in Pharo right now, you canât⦠btw, even #isSymlink method is currently broken (I coded a replacement with UFFI but while making it work with linux I broke it with mac⦠and no time yet to finish it :( ) but I suppose also creating symlinks is something we can add soon :) Esteban On 20 Jun 2016, at 16:22, Thibault ARLOING <thibault.arloing@hotmail.fr<mailto:thibault.arloing@hotmail.fr>> wrote: Hi, I want to create a symbolic link via Pharo. But I don't know how, I found methods named #isSymlink but none for creation of symbolic links. Can we create a symbolic link via Pharo ? Thibault
I guess you can do it with OSSubProcess shell command Hilaire -- Dr. Geo http://drgeo.eu
Yes, I know but I want to use only Pharo classes because I don't want to add a dependency to OSSubProcess in my program thanks anyway for your answer Thibault ________________________________ De : Pharo-users <pharo-users-bounces@lists.pharo.org> de la part de Hilaire <hilaire@drgeo.eu> Envoyé : lundi 20 juin 2016 17:21 à : pharo-users@lists.pharo.org Objet : Re: [Pharo-users] Symbolic links in Pharo I guess you can do it with OSSubProcess shell command Hilaire -- Dr. Geo http://drgeo.eu GNU Dr. Geo, be a geometer!<http://drgeo.eu/> drgeo.eu Be a Geometer! Dr. Geo, a software to design & manipulate interactive geometric sketches. It helps kids to explore geometry. Distributed with its source code it is ...
You can use FFI; just create an object with a method⦠MyObject>>system: command "Perform OS system() call." ^ self ffiCall: #(int system #(char * command)) module: LibC And then you can do something like MyObject new system: 'ln -s /tmp/source /tmp/target' On Mon, Jun 20, 2016 at 5:57 PM, Thibault ARLOING < thibault.arloing@hotmail.fr> wrote:
Yes, I know but I want to use only Pharo classes because I don't want to add a dependency to OSSubProcess in my program
thanks anyway for your answer
Thibault
------------------------------ *De :* Pharo-users <pharo-users-bounces@lists.pharo.org> de la part de Hilaire <hilaire@drgeo.eu> *Envoyé :* lundi 20 juin 2016 17:21 *à :* pharo-users@lists.pharo.org *Objet :* Re: [Pharo-users] Symbolic links in Pharo
I guess you can do it with OSSubProcess shell command
Hilaire -- Dr. Geo http://drgeo.eu GNU Dr. Geo, be a geometer! <http://drgeo.eu/> drgeo.eu Be a Geometer! Dr. Geo, a software to design & manipulate interactive geometric sketches. It helps kids to explore geometry. Distributed with its source code it is ...
So cool. For a command taking some time to execute, can it be make non-blocking for the image? For example when using it from a Seaside server where you need to execute such a command but you do not want to bock all the Seaside sessions. Thanks Hilaire Le 20/06/2016 18:03, Peter Uhnák a écrit :
You can use FFI; just create an object with a methodâ¦
MyObject>>system: command "Perform OS system() call."
^ self ffiCall: #(int system #(char * command)) module: LibC
And then you can do something like
MyObject new system: 'ln -s /tmp/source /tmp/target'
-- Dr. Geo http://drgeo.eu
1) you can fork in the program you are launching 2) you can fork in the command you are launching⦠just like a regular shell (because that's what system() does) e.g. MyObject new system: '{ sleep 5; touch /tmp/test.txt; } &' On Tue, Jun 21, 2016 at 11:00 AM, Hilaire <hilaire@drgeo.eu> wrote:
So cool. For a command taking some time to execute, can it be make non-blocking for the image?
For example when using it from a Seaside server where you need to execute such a command but you do not want to bock all the Seaside sessions.
Thanks
Hilaire
Le 20/06/2016 18:03, Peter Uhnák a écrit :
You can use FFI; just create an object with a methodâ¦
MyObject>>system: command "Perform OS system() call."
^ self ffiCall: #(int system #(char * command)) module: LibC
And then you can do something like
MyObject new system: 'ln -s /tmp/source /tmp/target'
-- Dr. Geo http://drgeo.eu
participants (4)
-
Esteban Lorenzano -
Hilaire -
Peter Uhnák -
Thibault ARLOING