Hi all,
The Win32Utils Team is happy to announce the release of win32-file
0.4.0.
What's new?
···
===========
This release adds native method support. The File.nopen, File#nread
and File#nwrite methods have been added. These are wrappers for
CreateFile(), ReadFile() and WriteFile(), respectively.
The File.size method has also been redefined to use GetFileSizeEx() on
those platforms that support it. This was added because the current
Ruby implementation returns bogus values for file sizes greater than 2
GB.
The File#path method has been redefined to resort to GetFullPathName()
in the event that the core Ruby method should fail. This was done for
internal reasons, but has the side effect of making it a bit more
reliable on Win32.
What's the point?
The native methods allow finer control over File operations on the
Win32 platform. There are many more options available to pass to
File.nopen versus Ruby's File.open. These options can be used to
define more detailed access restrictions, improve read performance by
doing sequential scans, overlapped (asynchronous) IO, and more. You
can also do some other things, like create files with the same name
differing only in case, or doing cached, or non-cached, reads.
You may get much, much better performance, especially when doing
cached reads. No benchmarks yet. I may post some soon.
Where is it?
You can find it on the RAA or on the RubyForge project page at
http://www.rubyforge.org/projects/win32utils.
Enjoy!
The Win32Utils Team