?
Ce document utilise Manuel du site Web PHP chinois Libérer
JScript? | 語言參考 |
根據(jù)提供的路徑說明返回明確完整的路徑。
object.GetAbsolutePathName(pathspec)
object
必需 應為 FileSystemObject 的名稱。
pathspec
必選項。 要變?yōu)槊鞔_完整路徑的路徑說明
如果路徑提供了從指定驅(qū)動器的根開始的完整的引用,那么它就是明確和完整的。 如果路徑指定的是映射驅(qū)動器的根文件夾,那么完整的路徑將只能由一個路徑分隔符 (\) 結(jié)束。
假設當前目錄是 c:\mydocuments\reports ,下表說明了 GetAbsolutePathName 方法的操作。
pathspec | 返回的路徑 |
---|---|
"c:" | "c:\mydocuments\reports" |
"c:.." | "c:\mydocuments" |
"c:\\" | "c:\" |
"c:*.*\\may97" | "c:\mydocuments\reports\*.*\may97" |
"region1" | "c:\mydocuments\reports\region1" |
"c:\\..\\..\\mydocuments" | "c:\mydocuments" |
下面的例子說明了 GetAbsolutePathName 方法的用法。
function ShowAbsolutePath(path) {
???var fso, s= "";
???fso = new ActiveXObject("Scripting.FileSystemObject");
???s += fso.GetAbsolutePathName(path);
???return(s);
}
GetBaseName 方法 | GetDrive 方法 | GetDriveName 方法 | GetExtensionName 方法 | GetFile 方法 | GetFileName 方法 | GetFlieVersion 方法 | GetFolder 方法 | GetParentFolderName 方法 | GetSpecialFolder 方法 | GetTempName 方法應用于: FileSystemObject 對象