function gets file path but i have a string with the 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.
精彩评论