[ANN] win32-dir 0.2.0

B

Berger, Daniel

Hi all,

I'm happy to announce the release of win32-dir 0.2.0.

What is it?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
A series of extra constants for the Dir class that define special
folders on Win32 systems, in addition to methods for creating junctions
and detecting reparse directories.

What's new?
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This release adds two methods: Dir.create_junction and Dir.reparse_dir?.
The former lets you create junctions (i.e. symlinks) for directories.
The latter lets you detect if a given directory is a reparse point.

Quick example:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
require "win32/dir"
require "ptools"

Dir.mkdir("from")
Dir.create_junction("to", "from")
File.touch("from/test.txt")

Dir.entries("to") =3D> [".", "..", "test.txt"]

Warning to folks who already downloaded it prior to this email:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I botched the zip file a bit, and there was a bug in the extconf.rb
script I forgot to fix. You'll need to delete the win32/dir.rb (not the
so) file. Also, you may need to move the dir.so under the win32
directory if it's not already there (look under your sitelibdir).

I uploaded a new (fixed) zip file, so this isn't an issue if you're just
now downloading the file.

Thanks go to Timothy Byrd (directly) and Autrijus Tang (indirectly), as
well as all the other folks who contributed on the win32utils-dev
mailing list, for both code and ideas.

Heading off the inevitable question off at the pass:
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
It was decided to release this as Dir.create_junction, rather than
defining File.symlink for Windows, because junctions only work for
directories, not regular files. It's easy enough to create a facade if
you really want to.

For more info visit the project page at
http://www.rubyforge.org/projects/win32utils.

Regards,

The Win32 Utils team
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,281
Latest member
Pedroaciny

Latest Threads

Top