Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
DotNet
acad.assignment.mngr
academic
adonet
aspnet
aspnet.announcements
aspnet.build.controls
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
clr
compactframework
component_services
datatools
distributed_apps
drawing
faqs
framework
framework.wmi
general
internationalization
interop
languages.csharp
languages.jscript
languages.vb
languages.vb.controls
languages.vb.data
languages.vb.upgrade
languages.vc
languages.vc.libraries
myservices
odbcnet
performance
remoting
scripting
sdk
security
setup
vjsharp
vsa
webservi.enhancements
webservices
windowsforms
windowsforms.controls
winforms.databinding
winforms.designtime
xml
  
 
date: 1 Mar 2007 14:32:04 -0800,    group: microsoft.public.dotnet.faqs        back       


Advanced IO in .Net; unanswerable ?   
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 ;) ...
date: 1 Mar 2007 14:32:04 -0800   author:   modosansreves

Re: Advanced IO in .Net; unanswerable ?   
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 ;) ...
>
date: Thu, 1 Mar 2007 17:28:03 -0800   author:   RobinS

Re: Advanced IO in .Net; unanswerable ?   
>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.
date: Fri, 02 Mar 2007 07:01:14 +0100   author:   Mattias Sjgren

Re: Advanced IO in .Net; unanswerable ?   
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.
date: 10 Mar 2007 05:51:01 -0800   author:   modosansreves

Re: Advanced IO in .Net; unanswerable ?   
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.
> 
> ...
date: Wed, 14 Mar 2007 12:28:28 -0700   author:   BrianH

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us