summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-11-01 10:08:39 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-11-01 10:08:39 (GMT)
commitb63e2b17063b770287357b30d1839c8df4e7eeb1 (patch)
treeb8fc54115e59b8320714e0e31971fa74f89ff067
parent5f868c1ea867c2ecf03252f4cdee5f52e2060f8e (diff)
downloadtcl-b63e2b17063b770287357b30d1839c8df4e7eeb1.zip
tcl-b63e2b17063b770287357b30d1839c8df4e7eeb1.tar.gz
tcl-b63e2b17063b770287357b30d1839c8df4e7eeb1.tar.bz2
Clarified [file nativename] usage. [Bug 1185154]
-rw-r--r--ChangeLog4
-rw-r--r--doc/file.n15
2 files changed, 16 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5a414e5..a19a492 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-11-01 Donal K. Fellows <donal.k.fellows@man.ac.uk>
+
+ * doc/file.n: Clarified use of [file normalize]. [Bug 1185154]
+
2007-10-30 Don Porter <dgp@users.sourceforge.net>
* generic/tcl.h: Bump version number to 8.5b2.1 to distinguish
diff --git a/doc/file.n b/doc/file.n
index 3a02c5a..b3243df 100644
--- a/doc/file.n
+++ b/doc/file.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: file.n,v 1.51 2007/10/30 23:50:54 dkf Exp $
+'\" RCS: @(#) $Id: file.n,v 1.52 2007/11/01 10:08:41 dkf Exp $
'\"
.so man.macros
.TH file n 8.3 Tcl "Tcl Built-In Commands"
@@ -272,8 +272,8 @@ or set then an error is generated.
\fBfile nativename \fIname\fR
.
Returns the platform-specific name of the file. This is useful if the
-filename is needed to pass to a platform-specific call, such as exec
-under Windows.
+filename is needed to pass to a platform-specific call, such as to a
+subprocess via \fBexec\fR under Windows (see \fBEXAMPLES\fR below).
.TP
\fBfile normalize \fIname\fR
.
@@ -489,6 +489,15 @@ if {![\fBfile isdirectory\fR [\fBfile dirname\fR $newName]]} {
\fBfile rename\fR $oldName $newName
\fBfile link\fR \-symbolic $oldName $newName
.CE
+.PP
+On Windows, a file can be
+.QW started
+easily enough (equivalent to double-clicking on it in the Explorer
+interface) but the name passed to the operating system must be in
+native format:
+.CS
+exec {*}[auto_execok start] {} [\fBfile nativename\fR ~/example.txt]
+.CE
.SH "SEE ALSO"
filename(n), open(n), close(n), eof(n), gets(n), tell(n), seek(n),
fblocked(n), flush(n)