length is larger than the current size of the filethe file is extended to length bytes if length is the current length of the file is used as the length as long as the file is nonempty (otherwisean exception will be raisedtagname is an optional string that can be used to name the mapping if tagname refers to an existing mappingthat mapping is opened otherwisea new mapping is created if tagname is nonean unnamed mapping is created access is an optional parameter that specifies the access mode it takes the same values for access as described for the unix version of mmap(shown earlier by defaultaccess is access_write offset is the number of bytes from the beginning of the file and defaults to it must be multiple of mmap allocationgranularity memory-mapped file objectmsupports the following methods close(closes the file subsequent operations will result in an exception find(string[start]returns the index of the first occurrence of string start specifies an optional starting position returns - if no match is found flush([offsetsize]flushes modifications of the in-memory copy back to the file system offset and size specify an optional range of bytes to flush otherwisethe entire mapping is flushed move(dst,src,countcopies count bytes starting at index src to the destination index dst this copy is performed using the memmove(functionwhich is guaranteed to work correctly when the source and destination regions happen to overlap read(nreads up to bytes from the current file position and returns the data as string read_byte(reads single byte from the current file position and returns as string of length readline(returns line of input starting at the current file position resize(newsizeresizes the memory-mapped object to contain newsize bytes seek(pos[whence]sets the file position to new value pos and whence have the same meaning as for the seek(method on file objects size(returns the length of the file this value may be larger than the size of the memorymapped region tell(returns the value of the file pointer lib fl ff