aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils/fileExists.js
diff options
context:
space:
mode:
authorDavid Skoland <davidskoland@gmail.com>2023-11-29 23:10:57 +0100
committerDavid Skoland <davidskoland@gmail.com>2023-11-29 23:10:57 +0100
commit477b93638c035ae9772376736726dbdc51845f51 (patch)
treedd56e42034304f2bd9291ed548cc51b7b5be8fca /webAO/utils/fileExists.js
parent4d2e26939647281e5a814f7089c8b7cd54f63171 (diff)
Rename fileExists.js to fileExists.ts
Diffstat (limited to 'webAO/utils/fileExists.js')
-rw-r--r--webAO/utils/fileExists.js18
1 files changed, 0 insertions, 18 deletions
diff --git a/webAO/utils/fileExists.js b/webAO/utils/fileExists.js
deleted file mode 100644
index 5b60976..0000000
--- a/webAO/utils/fileExists.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const fileExists = async (url) => new Promise((resolve) => {
- const xhr = new XMLHttpRequest();
- xhr.open('HEAD', url);
- xhr.onload = function checkLoad() {
- if (xhr.readyState === 4) {
- if (xhr.status === 200) {
- resolve(true);
- } else {
- resolve(false);
- }
- }
- };
- xhr.onerror = function checkError() {
- resolve(false);
- };
- xhr.send(null);
-});
-export default fileExists;