⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filename.n

📁 linux系统下的音频通信
💻 N
字号:
'\"'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.'\"'\" See the file "license.terms" for information on usage and redistribution'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.'\" '\" SCCS: @(#) filename.n 1.7 96/04/11 17:03:14'\" .so man.macros.TH filename n 7.5 Tcl "Tcl Built-In Commands".BS'\" Note:  do not modify the .SH NAME line immediately below!.SH NAMEfilename \- File name conventions supported by Tcl commands.BE.SH INTRODUCTION.PPAll Tcl commands and C procedures that take file names as argumentsexpect the file names to be in one of three forms, depending on thecurrent platform.  On each platform, Tcl supports file names in thestandard forms(s) for that platform.  In addition, on all platforms,Tcl supports a Unix-like syntax intended to provide a convenient wayof constructing simple file names.  However, scripts that are intendedto be portable should not assume a particular form for file names.Instead, portable scripts must use the \fBfile split\fR and \fBfilejoin\fR commands to manipulate file names (see the \fBfile\fR manualentry for more details)..SH PATH TYPES.PPFile names are grouped into three general types based on the starting pointfor the path used to specify the file: absolute, relative, andvolume-relative.  Absolute names are completely qualified, giving a path tothe file relative to a particular volume and the root directory on thatvolume.  Relative names are unqualified, giving a path to the file relative to the current working directory.  Volume-relative names are partiallyqualified, either giving the path relative to the root directory on thecurrent volume, or relative to the current directory of the specifiedvolume.  The \fBfile pathtype\fR command can be used to determine thetype of a given path..SH PATH SYNTAX.PPThe rules for native names depend on the value reported in the Tclarray element \fBtcl_platform(platform)\fR:.TP 10\fBmac\fROn Apple Macintosh systems, Tcl supports two forms of path names.  Thenormal Mac style names use colons as path separators.  Paths may berelative or absolute, and file names may contain any character otherthan colon.  A leading colon causes the rest of the path to beinterpreted relative to the current directory.  If a path contains acolon that is not at the beginning, then the path is interpreted as anabsolute path.  Sequences of two or more colons anywhere in the pathare used to construct relative paths where \fB::\fR refers to theparent of the current directory, \fB:::\fR refers to the parent of theparent, and so forth..RS.PPIn addition to Macintosh style names, Tcl also supports a subset ofUnix-like names.  If a path contains no colons, then it is interpretedlike a Unix path.  Slash is used as the path separator.  The file name\fB\&.\fR refers to the current directory, and \fB\&..\fR refers to theparent of the current directory.  However, some names like \fB/\fR or\fB/..\fR have no mapping, and are interpreted as Macintosh names.  Ingeneral, commands that generate file names will return Macintosh stylenames, but commands that accept file names will take both Macintoshand Unix-style names..PPThe following examples illustrate various forms of path names:.TP 15\fB:\fRRelative path to the current folder..TP 15\fBMyFile\fRRelative path to a file named \fBMyFile\fR in the current folder..TP 15\fBMyDisk:MyFile\fRAbsolute path to a file named \fBMyFile\fR on the device named \fBMyDisk\fR..TP 15\fB:MyDir:MyFile\fRRelative path to a file name \fBMyFile\fR in a folder named\fBMyDir\fR in the current folder..TP 15\fB::MyFile\fRRelative path to a file named \fBMyFile\fR in the folder above thecurrent folder..TP 15\fB:::MyFile\fRRelative path to a file named \fBMyFile\fR in the folder two levels above thecurrent folder. .TP 15\fB/MyDisk/MyFile\fRAbsolute path to a file named \fBMyFile\fR on the device named\fBMyDisk\fR..TP 15\fB\&../MyFile\fRRelative path to a file named \fBMyFile\fR in the folder above thecurrent folder..RE.TP\fBunix\fROn Unix platforms, Tcl uses path names where the components areseparated by slashes.  Path names may be relative or absolute, andfile names may contain any character other than slash.  The file names\fB\&.\fR and \fB\&..\fR are special and refer to the current directoryand the parent of the current directory respectively.  Multipleadjacent slash characters are interpreted as a single separator.The following examples illustrate various forms of path names:.RS.TP 15\fB/\fRAbsolute path to the root directory..TP 15\fB/etc/passwd\fRAbsolute path to the file named \fBpasswd\fR in the directory\fBetc\fR in the root directory..TP 15\fB\&.\fRRelative path to the current directory..TP 15\fBfoo\fRRelative path to the file \fBfoo\fR in the current directory..TP 15\fBfoo/bar\fRRelative path to the file \fBbar\fR in the directory \fBfoo\fR in thecurrent directory..TP 15\fB\&../foo\fRRelative path to the file \fBfoo\fR in the directory above the currentdirectory. .RE.TP\fBwindows\fROn Microsoft Windows platforms, Tcl supports both drive-relative and UNCstyle names.  Both \fB/\fR and \fB\e\fR may be used as directory separatorsin either type of name.  Drive-relative names consist of an optional drivespecifier followed by an absolute or relative path.  UNC paths follow thegeneral form \fB\e\eservername\esharename\epath\efile\fR.  In both forms,the file names \fB.\fR and \fB..\fR are special and refer to the currentdirectory and the parent of the current directory respectively.  Thefollowing examples illustrate various forms of path names:.RS.TP 15\fB\&\e\eHost\eshare/file\fRAbsolute UNC path to a file called \fBfile\fR in the root directory ofthe export point \fBshare\fR on the host \fBHost\fR..TP 15\fBc:foo\fRVolume-relative path to a file \fBfoo\fR in the current directory on drive\fBc\fR..TP 15\fBc:/foo\fRAbsolute path to a file \fBfoo\fR in the root directory of drive\fBc\fR..TP 15\fBfoo\ebar\fRRelative path to a file \fBbar\fR in the \fBfoo\fR directory in the currentdirectory on the current volume..TP 15\fB\&\efoo\fRVolume-relative path to a file \fBfoo\fR in the root directory of the currentvolume..RE.SH TILDE SUBSTITUTION.PPIn addition to the file name rules described above, Tcl also supports\fIcsh\fR-style tilde substitution.  If a file name starts with atilde, then the file name will be interpreted as if the first elementis replaced with the location of the home directory for the givenuser.  If the tilde is followed immediately by a separator, then the\fB$HOME\fR environment variable is substituted.  Otherwise thecharacters between the tilde and the next separator are taken as auser name, which is used to retrieve the user's home directory forsubstitution..PPThe Macintosh and Windows platforms do not support tilde substitutionwhen a user name follows the tilde.  On these platforms, attempts touse a tilde followed by a user name will generate an error.  Filenames that have a tilde without a user name will be substituted usingthe \fB$HOME\fR environment variable, just like for Unix..SH PORTABILITY ISSUES.PPNot all file systems are case sensitive, so scripts should avoid codethat depends on the case of characters in a file name.  In addition,the character sets allowed on different devices may differ, so scriptsshould choose file names that do not contain special characters like:\fB<>:"/\e|\fR.  The safest approach is to use names consisting ofalphanumeric characters only.  Also Windows 3.1 only supports filenames with a root of no more than 8 characters and an extension of nomore than 3 characters..SH KEYWORDScurrent directory, absolute file name, relative file name,volume-relative file name, portability

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -