[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Net::FTP and Mac binaries



At 7:14 PM +0100 5/11/99, Peter Westlake wrote:

}
} Well, I had assumed that Mac::Conversions would somehow affect
} the FTP transfer without me doing anything more. In fact, I needed
} to create a converter, convert the file, and then upload it:
}
}   $con = Mac::Conversions->new();
}   $con->macbinary('thing');
}   $ftp->put('thing.bin');

Right.

}
} That gives me a Mac file called 'thing' on the server.
} The silly thing is, I can't get it back! If I do
}
}   $ftp->get('thing');

This is from a Mac server?  Then think what you're asking it to do.  FTP as
a protocol knows nothing about the Mac double forked file format.  So
usually what servers do in this case is to assume you only want the data
fork when you ask for a file.  So it probably sent you the data fork of the
file named thing.

With NetPresenz, at least, if you had said $ftp->get('thing.bin'), it would
have converted it on the fly to a MacBinary file and sent it to you.

}
} then I get a file that appears to be a text file, just
} like the MacBinary'd .bin file. So I did
}
}   $ftp->get('thing', 'thing.bin');
}   $con->demacbinary('thing.bin');
}
} and it complains thusly:
}
}   # x outside of string.
}   File '...:site_perl:Mac:Conversions.pm'; Line 268

Probably because thing.bin was an empty file.  I should guard against that.

}
} Even sillier is the fact that if I send thing.bin to an
} FTP server running on Windows NT, I can get it back without
} any trouble. It doesn't get converted back to its original
} form (i.e. it stays as thing.bin when it gets to the server),
} and I have to download it using the 'thing.bin' name,
} and I can then demacbinary it without any trouble at all.
}
} What I ultimately want to do is use FTP (or some other reliable
} method) to get Mac files to an NT Server, which will put them
} onto a CD. For that I need an FTP server for NT which knows
} about MacBinary and can demacbinary files just as NCSA Telnet
} does, but I don't know if there is one. It would be nice if
} this hypothetical server would let me get files back again,
} too ;-/

I think you're asking way too much of poor brain dead NT.

}
} Peter.
}


-----
Paul J. Schinder
schinder@pobox.com

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org