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
|
Ok, I will create my symbolic links with a bash script until it is available in Pharo
Thanks Thibault De : Pharo-users <[hidden email]> de la part de Esteban Lorenzano <[hidden email]>
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
|
In reply to this post by Thibault ARLOING
|
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 <[hidden email]> de la part de Hilaire <[hidden email]>
Envoyé : lundi 20 juin 2016 17:21 À : [hidden email] Objet : Re: [Pharo-users] Symbolic links in Pharo I guess you can do it with OSSubProcess shell command
Hilaire -- Dr. Geo http://drgeo.eu
|
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 <[hidden email]> 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 |
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 <[hidden email]> wrote: So cool. |
Free forum by Nabble | Edit this page |