--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: Creates a byte-range lock on the file specified by the given <tt>handle</tt>. This operation is only available in SFTP protocol versions 6 and higher. The lock may be either mandatory or advisory.
- !ruby/struct:SM::Flow::P 
  body: "The <tt>handle</tt> parameter is a file handle, as obtained by the #open method."
- !ruby/struct:SM::Flow::P 
  body: The <tt>offset</tt> and <tt>length</tt> parameters describe the location and size of the byte range.
- !ruby/struct:SM::Flow::P 
  body: "The <tt>mask</tt> describes how the lock should be defined, and consists of some combination of the following bit masks:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: 0x0040 - Read lock. The byte range may not be accessed for reading by via any other handle, though it may be written to.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: 0x0080 - Write lock. The byte range may not be written to via any other handle, though it may be read from.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: 0x0100 - Delete lock. No other handle may delete this file.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: 0x0200 - Advisory lock. The server need not honor the lock instruction.
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Once created, the lock may be removed via the #unblock method."
full_name: Net::SFTP::Session#block
is_singleton: false
name: block
params: |
  block(handle, offset, length, mask) -> request
  block(handle, offset, length, mask) { |response| ... } -> request

visibility: public
