Timothy Byrd
2005-Mar-14 04:03 UTC
[Win32utils-devel] Ruby code to create junctions on NTFS volumes.
Here is some Ruby code for creating junctions on NTFS volumes. These are the main routines: Dir.junction?(dir) => true if dir is a junction Dir.reparse_target(dir) => returns the target of a junction, or dir Dir.create_junction(junctName, existingTarget) => creates a junctName junction pointing to existingTarget (also used (Dan''s?) GetLastError code and did some simple wide/narrow character conversion) -- Timothy -------------- next part -------------- A non-text attachment was scrubbed... Name: junction.rb Type: application/octet-stream Size: 17601 bytes Desc: not available Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20050314/72060489/junction-0001.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: junction_sample.rb Type: application/octet-stream Size: 730 bytes Desc: not available Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20050314/72060489/junction_sample-0001.obj
Zach Dennis
2005-May-05 18:18 UTC
[Win32utils-devel] Ruby code to create junctions on NTFS volumes.
Timothy Byrd wrote:> > Here is some Ruby code for creating junctions on NTFS volumes. > > These are the main routines: > > Dir.junction?(dir) => true if dir is a junction > > Dir.reparse_target(dir) => returns the target of a junction, or dir > > Dir.create_junction(junctName, existingTarget) => creates a junctName > junction pointing to existingTarget > > (also used (Dan''s?) GetLastError code and did some simple wide/narrow > character conversion) >Timothy, I was able to test your code out tonight. It is very very awesome! This is a big help! Thank you so much! Daniel, Could this code get put into win32-dir ? Zach