I am doing writing to ascii file and while testing I have noticed the following:
The REMOVE(path_to_file) removes the file even if it is readonly.
The ADD(ascii_file) correctly does not add the row to the end of the ascii file if the file is readonly.
In clarion win32 REMOVE wouldn't erase readonly file.
Not important, just wanted to point out.
In fact, in my case erasing readonly file is OK for me:)
Nenad
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like c2j inherited java convention, which follows unix convention. readonly flag means you cannot access files contents, but you can delete the file. To prevent deletion/unlinking of a file, you need to make the containing directory readonly.
I think I prefer java convention, so I'll leave it as is for now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am doing writing to ascii file and while testing I have noticed the following:
The REMOVE(path_to_file) removes the file even if it is readonly.
The ADD(ascii_file) correctly does not add the row to the end of the ascii file if the file is readonly.
In clarion win32 REMOVE wouldn't erase readonly file.
Not important, just wanted to point out.
In fact, in my case erasing readonly file is OK for me:)
Nenad
Looks like c2j inherited java convention, which follows unix convention. readonly flag means you cannot access files contents, but you can delete the file. To prevent deletion/unlinking of a file, you need to make the containing directory readonly.
I think I prefer java convention, so I'll leave it as is for now.