Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/util/common/fileSystem.ts
13397 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
const FILES_WITHOUT_EXTENSION = ['dockerfile', 'license', 'makefile', 'readme', 'procfile', 'gemfile', 'rakefile', 'jenkinsfile', 'vagrantfile'];
7
export function looksLikeDirectory(filePath: string): boolean {
8
return /\.[^/.]+$/.test(filePath) && FILES_WITHOUT_EXTENSION.indexOf(filePath.toLowerCase()) === -1;
9
}
10