How to get the actual directory path on windows using .NET? -


my need simple. given windows directory path want actual path. sure terminology wrong, giving example.

given c:\documents , settings\all users method should display:

  • c:\programdata on windows 7
  • c:\documents , settings\all users on windows 2003

this because on windows 7 c:\documents , settings junction referencing c:\users , c:\users\all users yet junction referencing c:\programdata, actual directory.

so, question .net api lets me this?

thanks.

check out this code sample has figured out already.

essentially, have use win32 function deviceiocontrol via p/invoke passing fsctl_get_reparse_point dwiocontrolcode parameter.

as guy on codeproject says...

i find interesting .net framework's fileattributes enumeration includes value fileattributes.reparsepoint there no other built-in support reparse points.

there no "native" .net api this, bear in mind of framework wrapper around p/invoke calls anyway, shouldn't fear them :)


Comments

Popular posts from this blog

Javascript line number mapping -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -