Working with FTP, differences from documentation

Just starting out? Need help? Post your questions and find answers here.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Working with FTP, differences from documentation

Post by jassing »

The documentation says you must set the current directory before doing a putfile or getfile.
However, on windows, at least, I am seeing that I do not have to do that. Is it a fluke that it's working, or was the ftp library updated ? (ie: is the doc right or wrong?)
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Re: Working with FTP, differences from documentation

Post by tinman »

What version of the docs are you looking at? For PB 5.20 b 14 the manual says this (about the Filename$ parameter to SendFtpFile()):
PB Manual wrote:The name of the file to send. If the filename does not include a full path, it is interpreted relative to the current directory.
Edit: and similar for ReceiveFtpFile().

So it can work both ways depending on whether you pass a full or relative path. I've not actually tried this to see whether it's true or not though.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Working with FTP, differences from documentation

Post by jassing »

I must have had a brain fart while reading... I swear it said that the file must be in the current folder. Same for setftpdirectory, you have to change 1 at a time.
Well; wouldn't be the 1st time I misread something.
Thanks.
Post Reply