draft-ietf-secsh-filexfer-03.2.ps
来自「OTP是开放电信平台的简称」· PS 代码 · 共 2,108 行 · 第 1/5 页
PS
2,108 行
5 305 M( the client has this attribute, but must do this normalization itself.) s5 283 M( It is understood that the lack of well-defined semantics for file) s5 272 M( names may cause interoperability problems between clients and servers) s5 261 M( using radically different operating systems. However, this approach) s5 250 M( is known to work acceptably with most systems, and alternative) s5 239 M( approaches that e.g. treat file names as sequences of structured) s5 228 M( components are quite complicated.) s5 206 M(6.3 Opening, Creating, and Closing Files) s5 184 M( Files are opened and created using the SSH_FXP_OPEN message, whose) s5 173 M( data part is as follows:) s5 129 M(Galbraith, et al. Expires April 16, 2003 [Page 14]) s_RSPStoPSsaved restore%%Page: (14,15) 8userdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 0.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclip/showpage{}def/copypage{}def/erasepage{}defPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 15 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft SSH File Transfer Protocol October 2002) s5 690 M( uint32 id) s5 679 M( string filename [UTF-8]) s5 668 M( uint32 pflags) s5 657 M( ATTRS attrs) s5 635 M( The `id' field is the request identifier as for all requests.) s5 613 M( The `filename' field specifies the file name. See Section ``File) s5 602 M( Names'' for more information.) s5 580 M( The `pflags' field is a bitmask. The following bits have been) s5 569 M( defined.) s5 547 M( #define SSH_FXF_READ 0x00000001) s5 536 M( #define SSH_FXF_WRITE 0x00000002) s5 525 M( #define SSH_FXF_APPEND 0x00000004) s5 514 M( #define SSH_FXF_CREAT 0x00000008) s5 503 M( #define SSH_FXF_TRUNC 0x00000010) s5 492 M( #define SSH_FXF_EXCL 0x00000020) s5 481 M( #define SSH_FXF_TEXT 0x00000040) s5 459 M( These have the following meanings:) s5 437 M( SSH_FXF_READ) s5 426 M( Open the file for reading.) s5 404 M( SSH_FXF_WRITE) s5 393 M( Open the file for writing. If both this and SSH_FXF_READ are) s5 382 M( specified, the file is opened for both reading and writing.) s5 360 M( SSH_FXF_APPEND) s5 349 M( Force all writes to append data at the end of the file. The) s5 338 M( offset parameter to write will be ignored.) s5 316 M( SSH_FXF_CREAT) s5 305 M( If this flag is specified, then a new file will be created if one) s5 294 M( does not already exist \(if O_TRUNC is specified, the new file will) s5 283 M( be truncated to zero length if it previously exists\).) s5 261 M( SSH_FXF_TRUNC) s5 250 M( Forces an existing file with the same name to be truncated to zero) s5 239 M( length when creating a file by specifying SSH_FXF_CREAT.) s5 228 M( SSH_FXF_CREAT MUST also be specified if this flag is used.) s5 206 M( SSH_FXF_EXCL) s5 195 M( Causes the request to fail if the named file already exists.) s5 184 M( SSH_FXF_CREAT MUST also be specified if this flag is used.) s5 129 M(Galbraith, et al. Expires April 16, 2003 [Page 15]) s_RSPStoPSsaved restoreuserdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 421.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclipPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 16 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft SSH File Transfer Protocol October 2002) s5 690 M( SSH_FXF_TEXT) s5 679 M( Indicates that the server should treat the file as text and) s5 668 M( convert it to the canonical newline convention in use. \(See) s5 657 M( Determining Server Newline Convention. \(Section 4.3\)) s5 635 M( When a file is opened with the FXF_TEXT flag, the offset field in) s5 624 M( both the read and write function are ignored.) s5 602 M( Servers MUST correctly process multiple parallel reads and writes) s5 591 M( correctly in this mode. Naturally, it is permissible for them to) s5 580 M( do this by serializing the requests. It would not be possible for) s5 569 M( a client to reliably detect a server that does not implement) s5 558 M( parallel writes in time to prevent damage.) s5 536 M( Clients SHOULD use the SSH_FXF_APPEND flag to append data to a) s5 525 M( text file rather then using write with a calculated offset.) s5 503 M( To support seeks on text file the following SSH_FXP_EXTENDED) s5 492 M( packet is defined.) s5 448 M( string "text-seek") s5 437 M( string file-handle) s5 426 M( uint64 line-number) s5 404 M( line-number is the index of the line number to seek to, where byte) s5 393 M( 0 in the file is line number 0, and the byte directly following) s5 382 M( the first newline sequence in the file is line number 1 and so on.) s5 360 M( The response to a "text-seek" request is an SSH_FXP_STATUS) s5 349 M( message.) s5 327 M( An attempt to seek past the end-of-file should result in a) s5 316 M( SSH_FX_EOF status.) s5 294 M( Servers SHOULD support at least one "text-seek" in order to) s5 283 M( support resume. However, a client MUST be prepared to receive) s5 272 M( SSH_FX_OP_UNSUPPORTED when attempting a "text-seek" operation.) s5 261 M( The client can then try a fall-back strategy, if it has one.) s5 239 M( Clients MUST be prepared to handle SSH_FX_OP_UNSUPPORTED returned) s5 228 M( for read or write operations that are not sequential.) s5 206 M( The `attrs' field specifies the initial attributes for the file.) s5 195 M( Default values will be used for those attributes that are not) s5 184 M( specified. See Section ``File Attributes'' for more information.) s5 129 M(Galbraith, et al. Expires April 16, 2003 [Page 16]) s_RSPStoPSsaved restore%%Page: (16,17) 9userdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 0.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclip/showpage{}def/copypage{}def/erasepage{}defPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 17 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft SSH File Transfer Protocol October 2002) s5 690 M( The response to this message will be either SSH_FXP_HANDLE \(if the) s5 679 M( operation is successful\) or SSH_FXP_STATUS \(if the operation fails\).) s5 657 M( A file is closed by using the SSH_FXP_CLOSE request. Its data field) s5 646 M( has the following format:) s5 624 M( uint32 id) s5 613 M( string handle) s5 591 M( where `id' is the request identifier, and `handle' is a handle) s5 580 M( previously returned in the response to SSH_FXP_OPEN or) s5 569 M( SSH_FXP_OPENDIR. The handle becomes invalid immediately after this) s5 558 M( request has been sent.) s5 536 M( The response to this request will be a SSH_FXP_STATUS message. One) s5 525 M( should note that on some server platforms even a close can fail.) s5 514 M( This can happen e.g. if the server operating system caches writes,) s5 503 M( and an error occurs while flushing cached writes during the close.) s5 481 M(6.4 Reading and Writing) s5 459 M( Once a file has been opened, it can be read using the SSH_FXP_READ) s5 448 M( message, which has the following format:) s5 426 M( uint32 id) s5 415 M( string handle) s5 404 M( uint64 offset) s5 393 M( uint32 len) s5 371 M( where `id' is the request identifier, `handle' is an open file handle) s5 360 M( returned by SSH_FXP_OPEN, `offset' is the offset \(in bytes\) relative) s5 349 M( to the beginning of the file from where to start reading, and `len') s5 338 M( is the maximum number of bytes to read.) s5 316 M( In response to this request, the server will read as many bytes as it) s5 305 M( can from the file \(up to `len'\), and return them in a SSH_FXP_DATA) s5 294 M( message. If an error occurs or EOF is encountered before reading any) s5 283 M( data, the server will respond with SSH_FXP_STATUS. For normal disk) s5 272 M( files, it is guaranteed that this will read the specified number of) s5 261 M( bytes, or up to end of file. For e.g. device files this may return) s5 250 M( fewer bytes than requested.) s5 228 M( Writing to a file is achieved using the SSH_FXP_WRITE message, which) s5 217 M( has the following format:) s5 129 M(Galbraith, et al. Expires April 16, 2003 [Page 17]) s_RSPStoPSsaved restoreuserdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 421.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentmatrix putuserdict/PStoPSclip{0 0 moveto 595.000000 0 rlineto 0 842.000000 rlineto -595.000000 0 rlineto closepath}put initclipPStoPSxform concat%%BeginPageSetup_S75 0 translate/pagenum 18 def/fname () def/fdir () def/ftail () def/user_header_p false def%%EndPageSetup5 723 M(Internet-Draft SSH File Transfer Protocol October 2002) s5 690 M( uint32 id) s5 679 M( string handle) s5 668 M( uint64 offset) s5 657 M( string data) s5 635 M( where `id' is a request identifier, `handle' is a file handle) s5 624 M( returned by SSH_FXP_OPEN, `offset' is the offset \(in bytes\) from the) s5 613 M( beginning of the file where to start writing, and `data' is the data) s5 602 M( to be written.) s5 580 M( The write will extend the file if writing beyond the end of the file.) s5 569 M( It is legal to write way beyond the end of the file; the semantics) s5 558 M( are to write zeroes from the end of the file to the specified offset) s5 547 M( and then the data. On most operating systems, such writes do not) s5 536 M( allocate disk space but instead leave "holes" in the file.) s5 514 M( The server responds to a write request with a SSH_FXP_STATUS message.) s5 492 M(6.5 Removing and Renaming Files) s5 470 M( Files can be removed using the SSH_FXP_REMOVE message. It has the) s5 459 M( following format:) s5 437 M( uint32 id) s5 426 M( string filename [UTF-8]) s5 404 M( where `id' is the request identifier and `filename' is the name of) s5 393 M( the file to be removed. See Section ``File Names'' for more) s5 382 M( information. This request cannot be used to remove directories.) s5 360 M( The server will respond to this request with a SSH_FXP_STATUS) s5 349 M( message.) s5 327 M( Files \(and directories\) can be renamed using the SSH_FXP_RENAME) s5 316 M( message. Its data is as follows:) s5 294 M( uint32 id) s5 283 M( string oldpath [UTF-8]) s5 272 M( string newpath [UTF-8]) s5 250 M( where `id' is the request identifier, `oldpath' is the name of an) s5 239 M( existing file or directory, and `newpath' is the new name for the) s5 228 M( file or directory. It is an error if there already exists a file) s5 217 M( with the name specified by newpath. The server may also fail rename) s5 206 M( requests in other situations, for example if `oldpath' and `newpath') s5 195 M( point to different file systems on the server.) s5 173 M( The server will respond to this request with a SSH_FXP_STATUS) s5 129 M(Galbraith, et al. Expires April 16, 2003 [Page 18]) s_RSPStoPSsaved restore%%Page: (18,19) 10userdict/PStoPSsaved save putPStoPSmatrix setmatrix595.000000 0.271378 translate90 rotate0.706651 dup scaleuserdict/PStoPSmatrix matrix currentma
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?