Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2007

Tip: Looking for answers? Try searching our database.

Advanced IO in .Net; unanswerable ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
modosansreves - 01 Mar 2007 22:32 GMT
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 ;) ...
RobinS - 02 Mar 2007 01:28 GMT
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.
-----------------------------------------------
> For a rather long time I've been looking for the following
> functionality:
[quoted text clipped - 17 lines]
>
> Please ;) ...
Mattias Sjögren - 02 Mar 2007 06:01 GMT
>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
[quoted text clipped - 5 lines]
>>  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

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

modosansreves - 10 Mar 2007 13:51 GMT
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.
BrianH - 14 Mar 2007 20:28 GMT
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

> 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.
>
> ...
RobinS - 15 Mar 2007 19:18 GMT
You're welcome. I just cruise through once in a while and let people know.

Good luck.
Robin S.
--------------------
> 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
[quoted text clipped - 8 lines]
>>
>> ...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.