Make that "must have"

Clearly (past) time to get some sleep.  With that, happy Smalltalking to all, 
and good night :)




________________________________________
From: [email protected] 
[[email protected]] on behalf of Schwab,Wilhelm K 
[[email protected]]
Sent: Wednesday, November 02, 2011 11:46 PM
To: [email protected]
Subject: Re: [Pharo-project] Moving a file

Sean,

A couple of examples that might be helpful:

(1) ping somebody and get the output:

        ^( PipeableOSProcess command:'ping ', host, ' -c 4' ) output.


(2) from the selector name, I'm guessing that Dave was kind enough to send me 
this example in the days when I was completely (vs. now partially) clueless 
about the correct use of OSProcess:

tryDave

                | gp |

        gp := PipeableOSProcess command:'gnuplot'.
        gp setNonBlockingOutput.
        gp
                exec:'set output ""';
                exec:'set terminal png';
                exec:'plot sin(x)'.
        (Delay forMilliseconds: 1000) wait. "allow gnuplot to send data"
        gp upToEnd inspect. "all available stdout data"
        gp errorUpToEnd inspect.  "all available stderr data"
        gp close.

FWIW, it appears that I use exclusively PipeableOSProcess.  Note that you might 
need to send #closePipes.  Sadly, my comments don't say *why* I added it 
(distinct from above examples), but since I'm only now finding them, the 
addition must of fixed the problem I was having.  Searching the archives will 
likely turn up something with Dave explaining how and when to use it.  Good 
luck.

Bill

________________________________________
From: [email protected] 
[[email protected]] on behalf of Sean P. DeNigris 
[[email protected]]
Sent: Wednesday, November 02, 2011 9:58 PM
To: [email protected]
Subject: Re: [Pharo-project] Moving a file

Thanks, Bill.


Schwab,Wilhelm K wrote:
>
> (1) Squeak's file system leaves a lot to be desired - give us time :)
>
I didn't mean that as a dig against Squeak, just as a shorthand for "the
file system that traditionally has been included with Squeak"


Schwab,Wilhelm K wrote:
>
> (2) It's not really missing, use OSProcess and mv.
>
Yes, I think this is the best option for now; but my inquiry was also a
nudge to add this to the FS API ;-)


Schwab,Wilhelm K wrote:
>
> (3) FileDirectory contains some copy and delete functionality that could
> be combined
>
I want mv because of efficiency - cp-ing & then deleting 3.5gb takes what
feels like about 30 seconds, where an mv feels instantaneous.

Sean

--
View this message in context: 
http://forum.world.st/Moving-a-file-tp3983916p3984022.html
Sent from the Pharo Smalltalk mailing list archive at Nabble.com.



Reply via email to