extensions/typescript-language-features/src/languageFeatures/updatePathsOnRename.ts/isDirectory
async function isDirectory(resource: vscode.Uri): Promise<boolean> {
	try {
		return (await vscode.workspace.fs.stat(resource)).type === vscode.FileType.Directory;
	} catch {
		return false;
	}
}