Patch to add setting access time -- used by snaplock-like file-systems

View: New views
2 Messages — Rating Filter:   Alert me  

Patch to add setting access time -- used by snaplock-like file-systems

by athomson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Mike,

Attached is zip file with two diff's, one for SmbFile, and the other for
  Trans2SetFileInformation.  These are minor changes that expose the
lower level access time setting.

This is useful for people wanting to set retention on file systems that
support the snaplock-like interface.  Instead of using external or
command line tools, they can do everything from Jcifs.

An example of it's use:

  // set the retention time in milliseconds, this
  // is a future date for when the retention will expire
  smbfile.setAccessTime( retention );

  // set the file to read-only
  smbfile.setReadOnly();

The patch is against the jcifs 1.3.12 source tree.

Andy


setaccesstime.zip (2K) Download Attachment

Re: Patch to add setting access time -- used by snaplock-like file-systems

by Michael B Allen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andy,

Thanks. I put it in the patches directory.

Mike

On Mon, Nov 9, 2009 at 7:12 PM, Andy Thomson <a10008051@...> wrote:

> Mike,
>
> Attached is zip file with two diff's, one for SmbFile, and the other for
>  Trans2SetFileInformation.  These are minor changes that expose the
> lower level access time setting.
>
> This is useful for people wanting to set retention on file systems that
> support the snaplock-like interface.  Instead of using external or
> command line tools, they can do everything from Jcifs.
>
> An example of it's use:
>
>  // set the retention time in milliseconds, this
>  // is a future date for when the retention will expire
>  smbfile.setAccessTime( retention );
>
>  // set the file to read-only
>  smbfile.setReadOnly();
>
> The patch is against the jcifs 1.3.12 source tree.
>
> Andy
>



--
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/