The Mmap class implement memory-mapped file objects
The variables $' and $` are not available with gsub! and sub!
Object
lockall(flag)
disable paging of all pages mapped. flag can be Mmap::MCL_CURRENT or Mmap::MCL_FUTURE
new(file, [mode [, protection [, options]]])
create a new object
Pathname of the file, if nil is given an anonymous map is created Mmanp::MAP_ANON
Mode to open the file, it can be "r", "w" or "rw"
specify the nature of the mapping
Creates a mapping that's shared with all other processes mapping the same areas of the file. The default value is Mmap::MAP_SHARED
Creates a private copy-on-write mapping, so changes to the contents of the mmap object will be private to this process
Hash. If one of the options length or offset is specified it will not possible to modify the size of the mapped file.
Maps length bytes from the file
The mapping begin at offset
The type of the access (see #madvise)
unlockall
reenable paging
extend(count)
add count bytes to the file (i.e. pre-extend the file)
madvise(advice)
advice can have the value Mmap::MADV_NORMAL, Mmap::MADV_RANDOM, Mmap::MADV_SEQUENTIAL, Mmap::MADV_WILLNEED, Mmap::MADV_DONTNEED
mprotect(mode)
change the mode, value must be "r", "w" or "rw"
mlock
disable paging
msync
flush
flush the file
munlock
reenable paging
munmap
terminate the association
self == other
self > other
self >= other
self < other
self <= other
self === other
self << other
self =~ other
self[nth]
self[start..last]
self[start, length]
self[nth] = val
self[start..last] = val
self[start, len] = val
self <=> other
<<(other)
concat(other)
capitalize!
chop!
chomp!([rs])
crypt(salt)
delete!(str)
downcase!
each_byte {|char|...}
each([rs]) {|line|...}
each_line([rs]) {|line|...}
empty?
freeze
frozen
gsub!(pattern, replace)
gsub!(pattern) {...}
include?(other)
index(substr[, pos])
length
reverse!
rindex(substr[, pos])
scan(pattern)
scan(pattern) {...}
size
split([sep[, limit]])
squeeze!([str])
strip!
sub!(pattern, replace)
sub!(pattern) {...}
sum([bits])
swapcase!
tr!(search, replace)
tr_s!(search, replace)
upcase!