For a rather long time I've been looking for the following functionality: * On NTFS a file can have several names (hard links). How to enlist them ? * I'm going to create a file and I exactly know the future size. How can I - indicate that size in order to reduce possible fragmentation, - indicate that I'm going to do sequential writes only ? * On NTFS an empty folder can have a logical partition mounted to it. There are also junctions. Given a "folder" name, how to determine whether it is a regular folder, a mount point or a junction ? * Consequently from the previous, a logical partition can have multiple mount points. How to enlist them ? Please ;) ...
You might try posting your questions to microsoft.public.dotnet.languages.csharp or microsoft.public.dotnet.languages.vb, whichever is your choice. They are a lot more active than this one is. Robin S. ----------------------------------------------- "modosansreves" wrote in message news:1172788324.456152.115770@v33g2000cwv.googlegroups.com... > For a rather long time I've been looking for the following > functionality: > > * On NTFS a file can have several names (hard links). How to enlist > them ? > > * I'm going to create a file and I exactly know the future size. How > can I > - indicate that size in order to reduce possible fragmentation, > - indicate that I'm going to do sequential writes only ? > > * On NTFS an empty folder can have a logical partition mounted to it. > There are also junctions. > Given a "folder" name, how to determine whether it is a regular > folder, a mount point or a junction ? > > * Consequently from the previous, > a logical partition can have multiple mount points. How to enlist > them ? > > Please ;) ... >
>You might try posting your questions to >microsoft.public.dotnet.languages.csharp or >microsoft.public.dotnet.languages.vb, whichever is your choice. They are a >lot more active than this one is. I'd recommend posting to a group like microsoft.public.win32.programmer.kernel instead. The questions are in no way related to C# or VB. The answer will likely be the same regardless of which language you want to do this from. >> * On NTFS a file can have several names (hard links). How to enlist >> them ? I don't know any other way than to enumerate all files/links and checking if they refer to the same physical file (by calling GetFileInformationByHandle and comparing BY_HANDLE_FILE_INFORMATION.nFileIndexHigh/Low). >> * I'm going to create a file and I exactly know the future size. How >> can I >> - indicate that size in order to reduce possible fragmentation, >> - indicate that I'm going to do sequential writes only ? >> >> * On NTFS an empty folder can have a logical partition mounted to it. >> There are also junctions. >> Given a "folder" name, how to determine whether it is a regular >> folder, a mount point or a junction ? You can use GetVolumeNameForVolumeMountPoint or FindFirstVolumeMountPoint and related fuctions to determine which mount points there are. Junctions are implemented with reparse points, so you can check the attributes of the directory and look for FileAttributes.ReparsePoint. Mattias -- Mattias Sjgren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup.
Thank you very much, Mattias :) Unfortunately, I didn't met GetVolumeNameForVolumeMountPoint before and now I know at least one solution to my problems and a land to dig for other solutions.
Thank you very much Robin! I had missed these and they seem to be more in line with my current needs. I wouldn't have known about them if you hadn't gone out of your way to direct someone there. BrianH RobinS wrote: > You might try posting your questions to > microsoft.public.dotnet.languages.csharp or > microsoft.public.dotnet.languages.vb, whichever is your choice. They are a > lot more active than this one is. > > ...