From 5bb52de4e294463582101861f5caa89c2f35a3d5 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 22 May 2002 10:05:41 +0000 Subject: * cygpath.cc (usage): Change usage output slightly. * cygpath.cc (main): Add option l to support conversion to Windows long file names. Refactured code for capital options. Support of options from file for capital options. (dowin): New function. Refactured from main. (doit): Call long path conversion. (get_long_name): New function. (get_long_paths): New function. (get_long_path_name_w32impl): New function. Reimplementation of Windows API function GetLongPathName (only 98/Me/2000/XP or higher). (get_short_name): Call GetShortPathName only once. (get_short_paths): Fix calculating buffer size. * utils.sgml: Update cygpath section for l option. --- winsup/utils/utils.sgml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'winsup/utils/utils.sgml') diff --git a/winsup/utils/utils.sgml b/winsup/utils/utils.sgml index cbda63184..53448f2b0 100644 --- a/winsup/utils/utils.sgml +++ b/winsup/utils/utils.sgml @@ -71,18 +71,22 @@ or if you know what everything is already, just leave this out. cygpath -Usage: cygpath.exe [-p|--path] (-u|--unix)|(-w|--windows [-s|--short-name]) filename +Usage: cygpath [-p|--path] (-w|--windows) ([-s|--short-name]|[-l|--long-name]) filename +Usage: cygpath [-p|--path] (-u|--unix) filename +Usage: cygpath (-H|--homeroot)|(-S|--sysdir)|(-W|--windir) [-s|--short-name] +Usage: cygpath [-A|--allusers] (-D|--desktop)|(-P|--smprograms) [-s|--short-name] -a|--absolute output absolute path -c|--close handle close handle (for use in captured process) -f|--file file read file for input path information -i|--ignore ignore missing argument + -l|--long-name print Windows long form of filename -p|--path filename argument is a path -s|--short-name print Windows short form of filename -u|--unix print Unix form of filename -v|--version output version information and exit -w|--windows print Windows form of filename -A|--allusers use `All Users' instead of current user for -D, -P - -H|--homeroot output `Profiles' directory (home root) and exit\n\ + -H|--homeroot output `Profiles' directory (home root) and exit -D|--desktop output `Desktop' directory and exit -P|--smprograms output Start Menu `Programs' directory and exit -S|--sysdir output system directory and exit @@ -102,8 +106,14 @@ indicate whether you want a conversion from Windows to UNIX (POSIX) format (-u) or a conversion from UNIX (POSIX) to Windows format (-w). You must give exactly one of these. To give neither or both is an error. Use the --s option in combination with the -w - option to convert to Windows short form. +-l or -s option in combination +with the -w option to convert to Windows long or +short form. + +Caveat: The -l option does not work if the +check_case parameter of CYGWIN is set to strict, +since Cygwin is not able to match any Windows short path in this mode. + The -p option means that you want to convert a path-style string rather than a single filename. For example, the -- cgit v1.2.3