aboutsummaryrefslogtreecommitdiffstats
path: root/qt-cpp/src/util/fs.ts
blob: bb9b2a2398c78d2f1ecd424b0b7d2f24a3c0c3e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only

import * as fs from 'fs/promises';

export async function exists(path: string) {
  try {
    await fs.access(path);
    return true;
  } catch {
    return false;
  }
}