MFS, how get the handle of a file?

cancel
Showing results for 
Search instead for 
Did you mean: 

MFS, how get the handle of a file?

513 Views
emanueletrapani
Contributor III

Hi,

i work on a k64f, MQX 4.2.

There is a way to recover the handle of a opened file if i miss the fopen() return handle?

I have the pathname and the filename.

thank you

Emanuele Trapani

Labels (1)
Tags (1)
0 Kudos
1 Reply

348 Views
danielchen
NXP TechSupport
NXP TechSupport

Hi Emanuele:

File handle is a memory allocated for the given FILE_PTR from system memory pool.  Theoretically, it is possible to get it by walking through kernel data. Unfortunately MFS does not provide this API to do that.   You can save the fopen returned file handle into a global variable. I don't think it will be missed .:)

Have a great day,
Daniel