Last change
on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
1.1 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 | /**
|
---|
3 | * @license
|
---|
4 | * Copyright Google LLC All Rights Reserved.
|
---|
5 | *
|
---|
6 | * Use of this source code is governed by an MIT-style license that can be
|
---|
7 | * found in the LICENSE file at https://angular.io/license
|
---|
8 | */
|
---|
9 | Object.defineProperty(exports, "__esModule", { value: true });
|
---|
10 | exports.isDirectory = exports.isFile = void 0;
|
---|
11 | const fs_1 = require("fs");
|
---|
12 | /** @deprecated Since v11.0, unused by the Angular tooling */
|
---|
13 | function isFile(filePath) {
|
---|
14 | let stat;
|
---|
15 | try {
|
---|
16 | stat = fs_1.statSync(filePath);
|
---|
17 | }
|
---|
18 | catch (e) {
|
---|
19 | if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) {
|
---|
20 | return false;
|
---|
21 | }
|
---|
22 | throw e;
|
---|
23 | }
|
---|
24 | return stat.isFile() || stat.isFIFO();
|
---|
25 | }
|
---|
26 | exports.isFile = isFile;
|
---|
27 | /** @deprecated Since v11.0, unused by the Angular tooling */
|
---|
28 | function isDirectory(filePath) {
|
---|
29 | let stat;
|
---|
30 | try {
|
---|
31 | stat = fs_1.statSync(filePath);
|
---|
32 | }
|
---|
33 | catch (e) {
|
---|
34 | if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) {
|
---|
35 | return false;
|
---|
36 | }
|
---|
37 | throw e;
|
---|
38 | }
|
---|
39 | return stat.isDirectory();
|
---|
40 | }
|
---|
41 | exports.isDirectory = isDirectory;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.