web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
1001 B

  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.statSync = exports.stat = exports.Settings = void 0;
  4. const async = require("./providers/async");
  5. const sync = require("./providers/sync");
  6. const settings_1 = require("./settings");
  7. exports.Settings = settings_1.default;
  8. function stat(path, optionsOrSettingsOrCallback, callback) {
  9. if (typeof optionsOrSettingsOrCallback === 'function') {
  10. return async.read(path, getSettings(), optionsOrSettingsOrCallback);
  11. }
  12. async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
  13. }
  14. exports.stat = stat;
  15. function statSync(path, optionsOrSettings) {
  16. const settings = getSettings(optionsOrSettings);
  17. return sync.read(path, settings);
  18. }
  19. exports.statSync = statSync;
  20. function getSettings(settingsOrOptions = {}) {
  21. if (settingsOrOptions instanceof settings_1.default) {
  22. return settingsOrOptions;
  23. }
  24. return new settings_1.default(settingsOrOptions);
  25. }