forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutil.js
More file actions
20 lines (20 loc) · 718 Bytes
/
util.js
File metadata and controls
20 lines (20 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const fs = require("fs");
const path = require("path");
exports.ExtensionRootDir = path.dirname(__dirname);
function getListOfFiles(filename) {
filename = path.normalize(filename);
if (!path.isAbsolute(filename)) {
filename = path.join(__dirname, filename);
}
const data = fs.readFileSync(filename).toString();
const files = JSON.parse(data);
return files
.map(file => {
return path.join(exports.ExtensionRootDir, file.replace(/\//g, path.sep));
});
}
exports.getListOfFiles = getListOfFiles;