This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: utility to update existing cygwin symlinks to native format? (was Re: native symlink)
- From: Charles Wilson <cygwin at cwilson dot fastmail dot fm>
- To: cygwin-developers at cygwin dot com
- Date: Mon, 29 Apr 2013 20:44:01 -0400
- Subject: Re: utility to update existing cygwin symlinks to native format? (was Re: native symlink)
- References: <20130403152907 dot GD2468 at calimero dot vinschen dot de> <20130424103450 dot GM26397 at calimero dot vinschen dot de> <5177CABF dot 8040406 at openafs dot org> <20130424125043 dot GA18673 at calimero dot vinschen dot de> <51781CA4 dot 3040103 at openafs dot org> <20130424181412 dot GB26397 at calimero dot vinschen dot de> <3B3671F5-EBFE-480B-B592-90BA2270BDA6 at mac dot com> <42E7B9C6-1A6A-43D7-84B3-AEDD25EF4507 at mac dot com> <517F061D dot 5080201 at cygwin dot com> <671E245A-BDCD-4F46-90B7-9E73301126C1 at mac dot com> <20130430002548 dot GA7635 at ednor dot casa dot cgf dot cx> <9FCBD602-2D9C-4069-AA5F-682C32DE6D32 at mac dot com>
On 4/29/2013 8:34 PM, James Gregurich wrote:
On Apr 29, 2013, at 5:25 PM, Christopher Faylor wrote:
If you're asking "Did Corinna write a utility to do this?" the answer
is extremely likely to be "No" since she would have mentioned it if
she had.
If you're asking "Will Corinna write a utility to do this?" I suspect
that the answer is likely also "No".
Unfortunately, the utility is a necessity for practical use of the native symlink feature. I'm not opposed to writing it if I can get the necessary public function exposed in path.cc. I suppose the discussion can be tabled until she gets back. At a bare minimum, I'd need a function that returns the format of the symlink in question. With such a function, I could just delete the link and recreate it if the format is not native.
The winln program is part of the most recent cygutils package (1.4.12).
It was written by Daniel Colascione...
NAME
winln - create a Windows symbolic link
SYNOPSIS
winln [-svfdFA] TARGET LINKNAME
winln [-svfdFA] TARGET
winln [-svfdFA] TARGET... DIRECTORY
winln [-svfdFA] -t DIRECTORY TARGET...
DESCRIPTION
winln is a drop-in replacement for ln(1), the difference
being that
winln creates Windows symbolic links instead of Cygwin ones.
Note that
Windows has two kinds of symbolic links: file links and
directory
links. winln automatically chooses the correct type of link
when the
target exists, but if the target does not exist, you may
want to
explicitly specify the kind of link to create. Links to
non-existent
targets default to file links.
OPTIONS
-s, --symbolic
Create a symbolic (as opposed to hard) link. For compatibility
with ln(1), creating hard links is the default.
-v, --verbose
Print to standard output the names of links created.
-f, --force
Replace existing destination file.
-d, --directory
Create a directory symbolic link.
-F, --file
Create a file symbolic link.
-A, --auto
Automatically determine the type of symbolic link to create. If
the target exists and is a directory, create a directory sym�
bolic link. Otherwise, create a file symbolic link.
-t, --target-directory
Treat DIRECTORY as the directory in which to create links based
on the remaining arguments.
-T, --no-target-directory
Treat LINKNAME as a normal file always.
-h, --help
Show brief help message.
--version
Display version information
NOT IMPLEMENTED
winln does not implement the following command line arguments
from GNU
ln(1):
-b, --backup, -i, --interactive, -L, --logical, -n,
--no-dereference,
-P, --physical