File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 109
109
(rel [this other]
110
110
(if (satisfies? IFSPath other)
111
111
(rel- path this other)
112
- (throw " Second argument must satisfy IFSPath" )))
112
+ (throw [::AssertionException " Second argument must satisfy IFSPath" ] )))
113
113
114
114
(abs [this]
115
115
(path/- abs pathz))
157
157
(rel [this other]
158
158
(if (satisfies? IFSPath other)
159
159
(rel- path this other)
160
- (throw " Second argument must satisfy IFSPath" )))
160
+ (throw [::AssertionException " Second argument must satisfy IFSPath" ] )))
161
161
162
162
(abs [this]
163
163
(path/- abs pathz))
217
217
(cond
218
218
(path/- file ? x) (- > File x)
219
219
(not (path/- exists? x)) (- > File x)
220
- :else (throw (str " A non-file object exists at path: " x)))))
220
+ :else (throw [::NotAFileException (str " A non-file object exists at path: " x)] ))))
221
221
222
222
(defn dir
223
223
" Returns a dir if the path is a dir or does not exist. If a different filesystem object exists at the path an error will be thrown."
226
226
(cond
227
227
(path/- dir ? x) (- > Dir x)
228
228
(not (path/- exists? x)) (- > Dir x)
229
- :else (throw (str " A non-dir object exists at path: " x)))))
229
+ :else (throw [::NotADirectoryException (str " A non-dir object exists at path: " x)] ))))
230
230
231
231
(defn fspath
232
232
" Returns either a File or Dir if they exist at the path"
235
235
(cond
236
236
(path/- file ? x) (- > File x)
237
237
(path/- dir ? x) (- > Dir x)
238
- :else (throw (str " No file or directory at path: " x)))))
238
+ :else (throw [::FileNotFoundException (str " No file or directory at path: " x)] ))))
239
239
240
240
You can’t perform that action at this time.
0 commit comments