當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript path.join函數代碼示例

本文整理匯總了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'); }
開發者ID:eamodio,項目名稱:vscode,代碼行數:2,代碼來源:environmentService.ts

示例2: globalStorageHome

	@memoize
	get globalStorageHome(): string { return path.join(this.appSettingsHome, 'globalStorage'); }
開發者ID:eamodio,項目名稱:vscode,代碼行數:2,代碼來源:environmentService.ts

示例3: uniqueStorageDir

	function uniqueStorageDir(): string {
		const id = generateUuid();

		return join(tmpdir(), 'vsctests', id, 'storage2', id);
	}
開發者ID:PKRoma,項目名稱:vscode,代碼行數:5,代碼來源:storageService.test.ts

示例4: machineSettingsHome

	@memoize
	get machineSettingsHome(): string { return path.join(this.userDataPath, 'Machine'); }
開發者ID:eamodio,項目名稱:vscode,代碼行數:2,代碼來源:environmentService.ts

示例5: untitledWorkspacesHome

	@memoize
	get untitledWorkspacesHome(): URI { return URI.file(path.join(this.userDataPath, 'Workspaces')); }
開發者ID:eamodio,項目名稱:vscode,代碼行數:2,代碼來源:environmentService.ts

示例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;
開發者ID:PKRoma,項目名稱:vscode,代碼行數:16,代碼來源:package.ts

示例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();
			});
開發者ID:joelday,項目名稱:vscode,代碼行數:6,代碼來源:backupFileService.test.ts

示例8: backupHome

	@memoize
	get backupHome(): string { return path.join(this.userDataPath, 'Backups'); }
開發者ID:eamodio,項目名稱:vscode,代碼行數:2,代碼來源:environmentService.ts

示例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`);
			});
開發者ID:joelday,項目名稱:vscode,代碼行數:5,代碼來源:backupFileService.test.ts


注:本文中的vs/base/common/path.join函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。