[jcifs] Preserve lastModified TIME

Allen, Michael B (RSCH) Michael_B_Allen at ml.com
Wed Aug 14 14:03:47 EST 2002


The SMB_COM_CLOSE command provides a time field that should specify
the last modified time to be set on the file. Provided the documentation is
correct this should be simply a matter of adding a constructor parameter to
SmbComClose but there is currently no way to communicate to an SmbFile
what time should be used (although this would be great for copyTo).

> -----Original Message-----
> From:	andy chernow [SMTP:achernow at yahoo.com]
> Sent:	Tuesday, August 13, 2002 11:14 PM
> To:	jcifs at lists.samba.org
> Subject:	[jcifs] Preserve lastModified TIME
> 
> Just curious if there is a way to preserve the
> lastModified time of a local file when transporting it
> to a Samba or NT Server.  Is there such a Flag within
> the protocol?  
> 
> I searched through some of the ServerMessageBlock
> sub-classes and only found mention of file times
> within a response packet, SmbComNTCreateAndXResponse. 
> I looked in SmbComNTCreateAndX and noticed that within
> the writeParameterWordsWireFormat method, the filetime
> attributes are not sent.  I am not very familiar with
> the SMB protocol so I guess I am curious if this can
> be done?  If it can and jcifs currently doesn't
> support preserving filetimes, I will try to implement
> it myself.  Just don't want to go at something the
> protocol doesn't support.
> 
> I basically only need to preserve the lastModified
> time when creating a new file on server.   Currently
> when I transfer a file to the server, it's
> lastModified time is the time in which it was written.
> 
> I am shooting for some incremental functionality.
> 
> /sLaKr
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> HotJobs - Search Thousands of New Jobs
> http://www.hotjobs.com




More information about the jcifs mailing list