Changeset 8251
- Timestamp:
- Jan 23, 2008, 7:33:13 AM (17 years ago)
- File:
-
- 1 edited
-
branches/working-0711/ccl/level-1/l1-files.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/working-0711/ccl/level-1/l1-files.lisp
r8219 r8251 184 184 185 185 (defun create-file (path &key (if-exists :error) (create-directory t)) 186 ( native-to-pathname(%create-file path :if-exists if-exists186 (let* ((p (%create-file path :if-exists if-exists 187 187 :create-directory create-directory))) 188 (and p 189 (native-to-pathname p)))) 190 188 191 (defun %create-file (path &key 189 192 (if-exists :error) … … 195 198 (assert (or (eql if-exists :overwrite) 196 199 (null if-exists) 200 (eq if-exists :error) 197 201 (not (probe-file path))) () 198 202 "~s ~s not implemented yet" :if-exists if-exists) 199 203 (let* ((unix-name (native-translated-namestring path)) 200 204 (fd (fd-open unix-name (logior #$O_WRONLY #$O_CREAT #$O_TRUNC 201 (if (null if-exists) 205 (if (or (null if-exists) 206 (eq if-exists :error)) 202 207 #$O_EXCL 203 208 0))))) 204 209 (if (< fd 0) 205 (if (eql fd (- #$EEXIST)) ;#$O_EXCL was set and file existed 210 (if (and (null if-exists) 211 (eql fd (- #$EEXIST))) 206 212 (return-from %create-file nil) 207 213 (signal-file-error fd path))
Note:
See TracChangeset
for help on using the changeset viewer.
