You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by snpuvi <sn...@gmail.com> on 2008/07/31 08:57:42 UTC

[VFS] Files Last modified time

Hi,

How can I find the actual, file created/modified time using FTP schema. 
When I used FTP schema to find the files's last modified time returns the
same time for closely created files. But When I checked the modified time on
the file properties( Windows XP)  showed few seconds differences between the
files.
(works fine with SMB schema)

FileSystemManager fsManager = VFS.getManager();
FileObject ftpFile = fsManager.resolveFile("ftp://User:Pass@host/ftpShare");
FileObject[] file = ftpFile.findFiles(new MyFileSelector("my pattern"));

for (int i=0; i< file.length;i++)
{
    System.out.println(" last updated time
"+file[i].getContent().getLastModifiedTime());
}	

-- 
View this message in context: http://www.nabble.com/-VFS--Files-Last-modified-time-tp18748824p18748824.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [VFS] Files Last modified time

Posted by "simon.kitching@chello.at" <si...@chello.at>.
snpuvi schrieb:
> Hi,
>
> How can I find the actual, file created/modified time using FTP schema. 
> When I used FTP schema to find the files's last modified time returns the
> same time for closely created files. But When I checked the modified time on
> the file properties( Windows XP)  showed few seconds differences between the
> files.
> (works fine with SMB schema)
>
> FileSystemManager fsManager = VFS.getManager();
> FileObject ftpFile = fsManager.resolveFile("ftp://User:Pass@host/ftpShare");
> FileObject[] file = ftpFile.findFiles(new MyFileSelector("my pattern"));
>
> for (int i=0; i< file.length;i++)
> {
>     System.out.println(" last updated time
> "+file[i].getContent().getLastModifiedTime());
> }	
>
>   
Have you tried using ftp to connect to your server, doing an "ls" or 
"dir" or "modtime" and seeing what timestamp is displayed? That is the 
information that VFS has available to it....


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org