In .NET, is there any API that allows me to limit some I / O operations to the specified path?
For example:
Now I want to call a function like this:
IO.Directory.CreateDirectory("../testing/",Root)
And now I want the API to handle this situation for me and not create a folder other than the specified directory.
So this should be created as c:\Test\testing\instead c:\testing\.
I know that I can do it manually, but I thought that maybe there is an API that I donβt know that supports such a thing.
The fact is that I have a bunch of random lines, and I will split folders and files based on them, I do not want to write anything to another folder, because one of these lines includes a line like "../"