MFS, how get the handle of a file?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MFS, how get the handle of a file?

861 次查看
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

标签 (1)
标记 (1)
0 项奖励
回复
1 回复

696 次查看
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