function that me controls the existence a file
It exists in me10 a function that me controls the existence of a direttory or a file and in case I does not exist creates?
Sorry for my English bad. |
Re: function that me controls the existence a file
Check out your LISP manual. For files, the LISP open function does what you want - see http://www.lisp.org/HyperSpec/Body/fun_open.html. For example:
Code:
(setf s (open "foobar" :direction :output :if-does-not-exist :create)) Claus |
Re: function that me controls the existence a file
For macro in to ME10 ???????
|
Re: function that me controls the existence a file
Oops - sorry. I should be reading those posts more carefully 8-( :(
I don't know too much about OSDD's macro language, but the CREATE_DIRECTORY command might do what you need for directories. If the directory doesn't exist already, it will create it, otherwise issue an error (which you can probably catch using TRAP_ERROR). For files, OPEN_OUTFILE with option DEL_OLD might do the trick. Sorry again for the misunderstanding. Claus |
Re: function that me controls the existence a file
There may be a better way, but some of our macros use logic like this to test for the existence of a file.
Code:
LET Test_file_name 'C:\my_file.txt' |
Re: function that me controls the existence a file
thank you very much!
|
Re: function that me controls the existence a file
Good also for me!
|
All times are GMT -8. The time now is 11:57 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.