From: "J.Hawkesworth" Date: 2002-08-01T19:35:47+09:00 Subject: RE: ftp Whoops - incomplete message. As I was saying -----Original Message----- From: J.Hawkesworth Sent: 01 August 2002 11:28 To: 'ruby-talk@ruby-lang.org' Subject: RE: ftp I think what you are asking for is outside the remit of ftp. As I understand it (and I may be wrong) ftp saves files according to the umask (specified file permissions) defined in the ftp server's configuration. Its purpose is transfering files - something else has to make the executable. I expect there is also a security justification there somewhere too. You can make dirs ftp.mkdir or delete dirs ftp.rmdir but there's no single command to do both. But presumably you can test for the presence of a directory (using ftp.ls) and then delete the dir or whatever based on the result. While I'm typing I'd just like to say how much I like the ability to run up irb, type in: require 'net/ftp' ftp = Net::FTP::new('anftpserver') ftp.methods and then see all of the methods that ftp supports: ["return_code=", "close", "size", "delete", "list", "acct", "gettextfile", "retr binary", "voidcmd", "connect", "welcome", "passive=", "getdir", "pwd", "nlst", " resume", "dir", "ls", "storbinary", "sendcmd", "debug_mode", "resume=", "quit", "help", "mdtm", "rmdir", "mtime", "chdir", "puttextfile", "getbinaryfile", "retr lines", "return_code", "debug_mode=", "closed?", "status", "abort", "system", "m kdir", "rename", "putbinaryfile", "storlines", "login", "lastresp", "passive", " new_cond", "try_mon_enter", "mon_synchronize", "mon_exit", "mon_enter", "synchro nize", "==", "public_methods", "taint", "equal?", "===", "inspect", "clone", "ki nd_of?", "method", "instance_eval", "to_a", "type", "private_methods", "freeze", "id", "extend", "=~", "eql?", "singleton_methods", "tainted?", "is_a?", "method s", "dup", "nil?", "class", "instance_of?", "to_s", "display", "instance_variabl es", "send", "frozen?", "__id__", "__send__", "untaint", "respond_to?", "hash", "protected_methods"] marvelous! All the best, Jon (ruby newbie) -----Original Message----- From: Andrew Davies [mailto:adavies@optushome.com.au] Sent: 01 August 2002 01:40 To: ruby-talk ML Subject: ftp I uploaded from windows m.e. and I used: ftp = Net::FTP.new('www.4gigs.com', user, pass, ) files = ftp.chdir('public_html') ftp.puttextfile('it.rb', 'it.rb') ftp.close Is there some command like maybe? ftp.chmod( 'it.rb', 755 ) or ftp.make_or_remove_a_directory? Andrew Davies ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Control Centre. For further information visit http://www.star.net.uk/stats.asp _____________________________________________________________________ Any views or personal opinions expressed within this email may not be those of Talis Information Ltd. The content of this email message and any files that may be attached are confidential, and for the usage of the intended recipient only. If you are not the intended recipient, then please return this message to the sender and delete it. Any use of this e-mail by an unauthorised recipient is prohibited.