Reputation: 17
Is there a way to read a text file in matlab, without blocking the file.
so basically i want to read in read-only-mode and avoid blocking the files in case simultaneously another software is trying to updating/modify or delete them.
fopen/textscan will block the files.
Upvotes: 1
Views: 55
Reputation: 19870
You probably want to use Memory Mapping in MATLAB:
Benefits of Memory-Mapping
The principal benefits of memory-mapping are efficiency, faster file access, the ability to share memory between applications, and more efficient coding.
There are some limitations. The file should be pretty well structured. I'm also not sure what happens if other application change the file size.
Upvotes: 0