[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] win32-dir 0.2.0

Berger, Daniel

6/28/2005 9:35:00 PM

Hi all,

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

What is it?
===========
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?
===========
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:
==============
require "win32/dir"
require "ptools"

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

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

Warning to folks who already downloaded it prior to this email:
===============================================================
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:
====================================================
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/....

Regards,

The Win32 Utils team