News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
Maintenance release - 0.6.6
Author Message
mikshaw
Senior Member
****


Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
RE: Maintenance release - 0.6.6

Quote:
os.execute would work, but writing hacky workarounds per operating system isn't the most ideal solution.

I don't think it should be much of an issue. There are only three OSs to be concerned about, and two use the same copy command.

Code:
if murgaLua.getHostOs()=="windows" then copy="xcopy" else copy="cp" end
for file in lfs.dir(some_directory) do -- as an example
os.execute(copy.." "..file.." "..target)
end


Quote:
When one can use simple pure lua or LFS commands to lock, create, or delete directories and files, does it make any sense to not be able to do the same with moving some files?

I agree with this, although I never really noticed it before since I haven't done much work with managing files in Lua. It seems strange in particular that you can move a file but not copy it.

03-16-2008 04:55 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Maintenance release - 0.6.6 - JohnMurga - 03-11-2008, 12:12 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-11-2008, 01:57 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-11-2008, 07:51 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-15-2008, 08:46 PM
RE: Maintenance release - 0.6.6 - Juergen - 03-15-2008, 10:13 PM
RE: Maintenance release - 0.6.6 - iGame3D - 03-16-2008, 02:20 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-16-2008 04:55 AM
RE: Maintenance release - 0.6.6 - iGame3D - 03-16-2008, 07:06 PM
RE: Maintenance release - 0.6.6 - Juergen - 03-17-2008, 04:55 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-17-2008, 09:00 AM
RE: Maintenance release - 0.6.6 - jpjacobs - 03-18-2008, 01:49 AM
RE: Maintenance release - 0.6.6 - mikshaw - 03-18-2008, 01:00 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: