0.0
No commit activity in last 3 years
No release in over 3 years
Symlink functions for Windows (Vista and above)
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Win32::Symlink

Since the standard ruby library lacks symlink functions on Windows, this little library attempts to fill the gap.

Installation

Add this line to your application's Gemfile:

gem 'win32-symlink'

And then execute:

$ bundle

Or install it yourself as:

$ gem install win32-symlink

Usage

This library implements the following functons that mimic their ruby counterparts:

Win32::Symlink.readlink(link_name) -> file_name
Win32::Symlink.symlink?(link_name) -> true or false
Win32::Symlink.symlink(old_name, new_name) -> 0

'Portable' Usage

Instead of referencing symlink functions in the Win32::Symlink module it is possible to extend the Ruby File class and use the functions as on other systems, which support symlinks directly.

require 'win32/filesymlink' if RUBY_PLATFORM.include?('mingw')

File.symlink('path to source', 'symlink')
File.symlink?('symlink')
File.readlink('symlink')