Bruce B
2010-Dec-21 20:20 UTC
[asterisk-users] What is equivalent function to "mv" command in php for Asterisk Spool directory usage?
Hi Everyone, I understand that there are a few warnings about using "cp" to move .call files to /var/spool/asterisk/outgoing as they might acted upon before copy is done. So, using PHP, What is the equivalent of "mv" command? Would it be rename() in php or is there a better method? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101221/e3dd2121/attachment.htm>
Danny Nicholas
2010-Dec-21 20:23 UTC
[asterisk-users] What is equivalent function to "mv" command in php for Asterisk Spool directory usage?
PERL has a move() command; I wouldn't expect less out of PHP. _____ From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Bruce B Sent: Tuesday, December 21, 2010 2:20 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] What is equivalent function to "mv" command in php for Asterisk Spool directory usage? Hi Everyone, I understand that there are a few warnings about using "cp" to move .call files to /var/spool/asterisk/outgoing as they might acted upon before copy is done. So, using PHP, What is the equivalent of "mv" command? Would it be rename() in php or is there a better method? Thanks, -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20101221/59b74b15/attachment.htm>
Steve Edwards
2010-Dec-22 04:18 UTC
[asterisk-users] What is equivalent function to "mv" command in php for Asterisk Spool directory usage?
On Tue, 21 Dec 2010, Bruce B wrote:> So, using PHP,?What is the?equivalent?of "mv" command? Would it be > rename() in php or is there a better method?Not really an Asterisk question... On Tue, 21 Dec 2010, MrHanMan wrote:> I think rename() is what you're looking for+1 On Tue, 21 Dec 2010, Zeeshan Zakaria wrote:> exec ('mv *.call /var/spool/asterisk/outgoing')This will create a new process -- a relatively expensive activity. Also, this assumes the path to mv is in the PATH environment variable which it usually is, but if not can lead to a lot of confusion. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000