FSharp.Management icon indicating copy to clipboard operation
FSharp.Management copied to clipboard

Iconsistent reach of file `C:/Windows/System32/drivers/etc/hosts`

Open dzmitry-lahoda opened this issue 9 years ago • 3 comments

Compiles:

  type Windows = FileSystem<"C:/Windows/System32/drivers/etc">
  let updateHosts name (ip:IPAddress) = 
    Windows.hosts

Not compiles (where is etc?):

  type Windows = FileSystem<"C:/Windows/System32/drivers">
  let updateHosts name (ip:IPAddress) = 
    Windows.etc

I want to reach C:/Windows/System32/drivers/etc/hosts which is like local DNS table, sometimes used to to ensure .NET IO classes map to right network storage by name. Hence change of hosts during deployment.

dzmitry-lahoda avatar Aug 04 '15 13:08 dzmitry-lahoda

I think it's something with access rights.

vasily-kirichenko avatar Aug 04 '15 14:08 vasily-kirichenko

Not sure how type providers work, but can FileSystem<"C:/Windows/System32/drivers/"> run in one rights, but when I type Windows.etc in VS 2015 editor to be under other rights?

dzmitry-lahoda avatar Aug 04 '15 14:08 dzmitry-lahoda

Ensured hidden and read only are not applied to etc and its content.

dzmitry-lahoda avatar Aug 04 '15 15:08 dzmitry-lahoda