本文整理匯總了TypeScript中vs/base/common/path.join函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript join函數的具體用法?TypeScript join怎麽用?TypeScript join使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了join函數的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: machineSettingsPath
@memoize
get machineSettingsPath(): string { return path.join(this.machineSettingsHome, 'settings.json'); }
示例2: globalStorageHome
@memoize
get globalStorageHome(): string { return path.join(this.appSettingsHome, 'globalStorage'); }
示例3: uniqueStorageDir
function uniqueStorageDir(): string {
const id = generateUuid();
return join(tmpdir(), 'vsctests', id, 'storage2', id);
}
示例4: machineSettingsHome
@memoize
get machineSettingsHome(): string { return path.join(this.userDataPath, 'Machine'); }
示例5: untitledWorkspacesHome
@memoize
get untitledWorkspacesHome(): URI { return URI.file(path.join(this.userDataPath, 'Workspaces')); }
示例6:
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as path from 'vs/base/common/path';
import { getPathFromAmdModule } from 'vs/base/common/amd';
export interface IPackageConfiguration {
name: string;
version: string;
}
const rootPath = path.dirname(getPathFromAmdModule(require, ''));
const packageJsonPath = path.join(rootPath, 'package.json');
export default require.__$__nodeRequire(packageJsonPath) as IPackageConfiguration;
示例7:
return service.backupResource(untitledFile, model.createSnapshot()).then(() => {
assert.equal(fs.readdirSync(path.join(workspaceBackupPath, 'untitled')).length, 1);
assert.equal(fs.existsSync(untitledBackupPath), true);
assert.equal(fs.readFileSync(untitledBackupPath), `${untitledFile.toString()}\n${largeString}`);
model.dispose();
});
示例8: backupHome
@memoize
get backupHome(): string { return path.join(this.userDataPath, 'Backups'); }
示例9: createTextBufferFactory
return service.backupResource(untitledFile, createTextBufferFactory('test').create(DefaultEndOfLine.LF).createSnapshot(false)).then(() => {
assert.equal(fs.readdirSync(path.join(workspaceBackupPath, 'untitled')).length, 1);
assert.equal(fs.existsSync(untitledBackupPath), true);
assert.equal(fs.readFileSync(untitledBackupPath), `${untitledFile.toString()}\ntest`);
});