1

MSDN says "There is a limit of 31 reparse points on any given path." (http://msdn.microsoft.com/en-us/library/windows/desktop/aa365503%28v=vs.85%29.aspx) So, a single file can have max. 31 reparse points (?)

To check if a file has "a" reparse point, GetFileAttributes can be used (mentioned here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365507%28v=vs.85%29.aspx) and to get the content of "the" reparse point DeviceIoControl with FSCTL_GET_REPARSE_POINT is needed (cant post a third link because of low reputation)

But i see no possibility to specify what reparse data i want if there are multiple? GetFileAttributes will say only Yes/No instead of a count or something like that, and DeviceIoControl will fill one single REPARSE_GUID_DATA_BUFFER structure (according to MSDN), without any possibilty to give a GUID or index or somtehing like that.

edit: My question if i´ve understood this with 31 reparse points right and how i can access them.

deviantfan
  • 11,268
  • 3
  • 32
  • 49
  • I see a question mark but no actual question. – Captain Obvlious Dec 25 '13 at 20:53
  • I think the important part of the docs is `any given` *`path`*, i.e. the cumulative count of reparse points between all segments of a given path. That may technically exceed `31` in completely *out of control* over-engineered structures, and a file would still technically only match a single combination of of reparse points. – Frédéric Hamidi Dec 25 '13 at 20:54
  • @ Captain Obvlious: Added a specific question above. @Frédéric Hamidi: But a directory containing a reparse point itself cannot have any content (ie. files in it). Or do you mean, if i take junction points or something like that as example, that the system can only proces 31 reparse points in a single file open call "on the way" to the file? Will test that later... – deviantfan Dec 25 '13 at 21:14
  • `C:\This\Is\A\Complex\Path`. `This` can be a reparse point, as can `Is`, as can `A`, as can `Complex`, etc.. up to a maximum of 31. – Jonathan Potter Dec 25 '13 at 21:32
  • @Jonathan, indeed, and the admin should be taken out and ***XMAS CENSORED***. – Frédéric Hamidi Dec 25 '13 at 21:48
  • Thanks you all, Frédéric Hamidi and Jonathan Potter are right (of course ;) (@Frédéric Hamidi: If i´ve done something wrong, please say so) – deviantfan Dec 26 '13 at 09:42

1 Answers1

2

I understood the MSDN docs wrong: A file/directory itself can have only one reparse point itself (and a directory can have more than 31 files/directories with reparse points in it, of course)

The limit 31 is only valid for nested symlinks (etc.), ie. Case 1: Link1->Link2, Link2->Link3, ... Link32->RealDir Here it would not be possible to open Link1 if i want RealDir Case 2: If i want to open C:\L1\L2\L3\L4...\L32\file.txt and L1 is a symlink to another directory, the target´s subdirectory L2 is another symlink, and so on, this too wouldn´t be possible with >31 nested links.

deviantfan
  • 11,268
  • 3
  • 32
  • 49