hi All,
ZwSetInformationFile is used to set the file and directory information through
FileInformationClass .
Which FileInformationClass is used to set the file size and size on
disk parameters.
What are desired access required while opening/creating the file
before setting the above parameters.
.Thanks…>
Try using FILE_STANDARED_INFORMATION of FILE_ALLOCATION_INFORMATION u
can easily got the desired solution
On Wed, 30 Mar 2005 17:40:31 +0530, rakesh thakur
wrote:
> hi All,
> ZwSetInformationFile is used to set the file and directory information through
> FileInformationClass .
> Which FileInformationClass is used to set the file size and size on
> disk parameters.
> What are desired access required while opening/creating the file
> before setting the above parameters.
>
> >.Thanks…>
>
> —
> Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Thanks manish,
I used FILE_BASIC_INFORMATION to set the access time ,created time and
modified time which worked very well.
I used both FILE_STANDARD_INFORMATION or FILE_ALLOCATION_INFORMATION
after setting FILE_BASIC_INFORMATION
and closed the file.
but the newly created file dosent shows the modified size it always
shows 0 bytes.
Is there any other way to set the required information.
On Wed, 30 Mar 2005 17:47:17 +0530, Manish Sharma wrote:
> Try using FILE_STANDARED_INFORMATION of FILE_ALLOCATION_INFORMATION u
> can easily got the desired solution
>
>
> On Wed, 30 Mar 2005 17:40:31 +0530, rakesh thakur
> wrote:
> > hi All,
> > ZwSetInformationFile is used to set the file and directory information
> through
> > FileInformationClass .
> > Which FileInformationClass is used to set the file size and size on
> > disk parameters.
> > What are desired access required while opening/creating the file
> > before setting the above parameters.
> >
> > >.Thanks…>
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@gmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
Rakesh
you have to use FileEndOfFileInformation as the ‘FileInformationClass Value’ in ZwSetInformationFile to set the file size (and pass FILE_END_OF_FILE_INFORMATION->EndOfFile with the size u want to set).
NOTE : FileAllocationSize represents the size allocated on the disk and not the actual file size (or EOF). For example if the file has 10 bytes, the lower FSD may decide to allocate Fixed Size Pages(s) for optimization resons hence the alllocation size could be 4k/8k etc based on the physical FS.
FILE_END_OF_FILE_INFORMATION is use to indicate the new size.
-Vikramaditya.
“Life is not measured by the number of breaths we take, but by the moments that take our breath away”
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of rakesh thakur
Sent: Wednesday, March 30, 2005 7:31 AM
To: Windows File Systems Devs Interest List
Subject: Re:[ntfsd] how to set file size
Thanks manish,
I used FILE_BASIC_INFORMATION to set the access time ,created time and
modified time which worked very well.
I used both FILE_STANDARD_INFORMATION or FILE_ALLOCATION_INFORMATION
after setting FILE_BASIC_INFORMATION
and closed the file.
but the newly created file dosent shows the modified size it always
shows 0 bytes.
Is there any other way to set the required information.
On Wed, 30 Mar 2005 17:47:17 +0530, Manish Sharma wrote:
> Try using FILE_STANDARED_INFORMATION of FILE_ALLOCATION_INFORMATION u
> can easily got the desired solution
>
>
> On Wed, 30 Mar 2005 17:40:31 +0530, rakesh thakur
> wrote:
> > hi All,
> > ZwSetInformationFile is used to set the file and directory information
> through
> > FileInformationClass .
> > Which FileInformationClass is used to set the file size and size on
> > disk parameters.
> > What are desired access required while opening/creating the file
> > before setting the above parameters.
> >
> > >.Thanks…>
> >
> > —
> > Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
> >
> > You are currently subscribed to ntfsd as: xxxxx@gmail.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
> >
>
> —
> Questions? First check the IFS FAQ at
> https://www.osronline.com/article.cfm?id=17
>
> You are currently subscribed to ntfsd as: xxxxx@gmail.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
—
Questions? First check the IFS FAQ at https://www.osronline.com/article.cfm?id=17
You are currently subscribed to ntfsd as: xxxxx@tacitnetworks.com
To unsubscribe send a blank email to xxxxx@lists.osr.com