DIRECTORY BridgeComm USING [NetworkStreamPair], IO USING [STREAM], Rope USING [ROPE]; BridgeFTPOps: CEDAR DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE ~ IO.STREAM; NetworkStreamPair: TYPE ~ BridgeComm.NetworkStreamPair; ActionProc: TYPE ~ PROC [nsp: NetworkStreamPair, bytesReported: INT, clientData: REF] RETURNS [quit: BOOLEAN ฌ FALSE]; RetrieveStream: PROC [nsp: NetworkStreamPair, remoteName: ROPE, action: ActionProc, clientData: REF ฌ NIL, msgStream: STREAM ฌ NIL] RETURNS [excuse: ROPE ฌ NIL]; StoreStream: PROC [nsp: NetworkStreamPair, remoteName: ROPE, overwrite: BOOL, action: ActionProc, clientData: REF ฌ NIL, msgStream: STREAM ฌ NIL] RETURNS [excuse: ROPE ฌ NIL]; }... l BridgeFTPOps.mesa Copyright ำ 1990, 1992 by Xerox Corporation. All rights reserved. Demers, October 12, 1990 11:34 am PDT Callback used by RetrieveStream or StoreStream, below: it's called with a network stream attached to a remote file; the action proc either reads or writes data until the end. May be UNWOUND (e.g. on network stream errors). "Feature:" For RetrieveStream the ActionProc is not called if the file being retrieved is empty. BytesReported is the number of bytes given by the data ack ('Dxxx'). -1 is returned if the ack doesn't supply the byte count, or for storing. It is assumed that bytesReported is really only a hint Open a network stream to the named file on the remote host, pass it to the action proc. Open a network stream to the named file on the remote host, pass it to the action proc. The semantics of file creation is controlled by the overwrite parameter: If TRUE, do a normal Unix-style create (e.g. store through symbolic links). If FALSE, write the file under a unique temporary id and rename at the end (thus breaking symbolic links and changing ownership, protection modes, etc). ส–•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ ฯeœ7™BK™%K™—šฯk ˜ Kšœ žœ˜%Kšžœžœžœ˜Kšœžœžœ˜K˜—šฯn œžœž œ˜#K˜Kšžœžœžœ˜Kšžœžœžœžœ˜Kšœžœ ˜7K˜šฯb œžœžœ)žœžœžœžœžœ˜vK™ฎKšœ/™/Kšœง™งK˜—šะbnœžœ&žœ"žœžœ žœžœžœ žœžœ˜กK™X—K˜šก œžœ&žœ žœ"žœžœ žœžœžœ žœžœ˜ฏK™ˆK˜—K˜K˜——…—บผ