本文整理汇总了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);
});