[Mono-dev] question about directory with white space
Edward Ned Harvey (mono)
edward.harvey.mono at clevertrove.com
Fri Jul 25 11:42:06 UTC 2014
> From: mono-devel-list-bounces at lists.ximian.com [mailto:mono-devel-list-
> bounces at lists.ximian.com] On Behalf Of Edwin Liu
>
> my os: ubuntu 14.04
>
> there is an directory like
>
> "/home/home api"
>
> which contains white space, I want to get file content within the directory
> "home api"
>
> the demo code like
>
> var file = new FileInfo("/home/home api/data")
>
> but it does not works
Please be more specific about "it does not work." Do you get an exception?
Assuming "data" is the name of the file, what you wrote should work. But you named your variable "file" and you're getting a FileInfo, which is not the same thing, so maybe you should rename your variable, or maybe you don't want a FileInfo and should use something else like FileStream.
More information about the Mono-devel-list
mailing list