.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / fast-glob / out / adapters / fs-sync.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/fast-glob/out/adapters/fs-sync.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/fast-glob/out/adapters/fs-sync.js
new file mode 100644 (file)
index 0000000..ae222e2
--- /dev/null
@@ -0,0 +1,59 @@
+"use strict";\r
+var __extends = (this && this.__extends) || (function () {\r
+    var extendStatics = function (d, b) {\r
+        extendStatics = Object.setPrototypeOf ||\r
+            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r
+            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r
+        return extendStatics(d, b);\r
+    };\r
+    return function (d, b) {\r
+        extendStatics(d, b);\r
+        function __() { this.constructor = d; }\r
+        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r
+    };\r
+})();\r
+Object.defineProperty(exports, "__esModule", { value: true });\r
+var fsStat = require("@nodelib/fs.stat");\r
+var fs_1 = require("./fs");\r
+var FileSystemSync = /** @class */ (function (_super) {\r
+    __extends(FileSystemSync, _super);\r
+    function FileSystemSync() {\r
+        return _super !== null && _super.apply(this, arguments) || this;\r
+    }\r
+    /**\r
+     * Use sync API to read entries for Task.\r
+     */\r
+    FileSystemSync.prototype.read = function (patterns, filter) {\r
+        var _this = this;\r
+        var entries = [];\r
+        patterns.forEach(function (pattern) {\r
+            var filepath = _this.getFullEntryPath(pattern);\r
+            var entry = _this.getEntry(filepath, pattern);\r
+            if (entry === null || !filter(entry)) {\r
+                return;\r
+            }\r
+            entries.push(entry);\r
+        });\r
+        return entries;\r
+    };\r
+    /**\r
+     * Return entry for the provided path.\r
+     */\r
+    FileSystemSync.prototype.getEntry = function (filepath, pattern) {\r
+        try {\r
+            var stat = this.getStat(filepath);\r
+            return this.makeEntry(stat, pattern);\r
+        }\r
+        catch (err) {\r
+            return null;\r
+        }\r
+    };\r
+    /**\r
+     * Return fs.Stats for the provided path.\r
+     */\r
+    FileSystemSync.prototype.getStat = function (filepath) {\r
+        return fsStat.statSync(filepath, { throwErrorOnBrokenSymlinks: false });\r
+    };\r
+    return FileSystemSync;\r
+}(fs_1.default));\r
+exports.default = FileSystemSync;\r