开发者

function gets file path but i have a string with the file content

开发者 https://www.devze.com 2023-01-03 04:01 出处:网络
I have a string with file content . But my function deals with file path on the disc . Any idea how i can solve this problem wit开发者_运维知识库hout writing to the disc my file content ?

I have a string with file content . But my function deals with file path on the disc . Any idea how i can solve this problem wit开发者_运维知识库hout writing to the disc my file content ?

Thanks for help.


I would say, overload your function so that it also takes filecontent as a parameter also?

If you can't alter the function and there is no other way, if it needs performance. Create a ram disk to write and read the file from.


What is "your function" is it function you wrote?
If it is - make it to deal with Stream and then the one that deals file name open a stream and call the new one.

0

精彩评论

暂无评论...
验证码 换一张
取 消