本文整理匯總了TypeScript中vs/base/common/paths.isAbsolute_win32函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript isAbsolute_win32函數的具體用法?TypeScript isAbsolute_win32怎麽用?TypeScript isAbsolute_win32使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了isAbsolute_win32函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: constructor
constructor(public raw: DebugProtocol.Source, sessionId: string) {
let path: string;
if (raw) {
path = this.raw.path || this.raw.name;
this.available = true;
} else {
this.raw = { name: UNKNOWN_SOURCE_LABEL };
this.available = false;
path = `${DEBUG_SCHEME}:${UNKNOWN_SOURCE_LABEL}`;
}
if (this.raw.sourceReference > 0) {
this.uri = uri.parse(`${DEBUG_SCHEME}:${encodeURIComponent(path)}?session=${encodeURIComponent(sessionId)}&ref=${this.raw.sourceReference}`);
} else {
if (isUri(path)) { // path looks like a uri
this.uri = uri.parse(path);
} else {
// assume a filesystem path
if (paths.isAbsolute_posix(path) || paths.isAbsolute_win32(path)) {
this.uri = uri.file(path);
} else {
// path is relative: since VS Code cannot deal with this by itself
// create a debug url that will result in a DAP 'source' request when the url is resolved.
this.uri = uri.parse(`${DEBUG_SCHEME}:${encodeURIComponent(path)}?session=${encodeURIComponent(sessionId)}`);
}
}
}
}
示例2:
].forEach(nonAbsolutePath => {
assert.ok(!paths.isAbsolute_win32(nonAbsolutePath), nonAbsolutePath);
});