manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1452841 - /manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Date Tue, 05 Mar 2013 15:08:54 GMT
Author: kwright
Date: Tue Mar  5 15:08:54 2013
New Revision: 1452841

URL: http://svn.apache.org/r1452841
Log:
Add modified date support to file connector.  Part of CONNECTORS-657.

Modified:
    manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java

Modified: manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java?rev=1452841&r1=1452840&r2=1452841&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
(original)
+++ manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Tue Mar  5 15:08:54 2013
@@ -279,8 +279,10 @@ public class FileConnector extends org.a
                     long fileBytes = file.length();
                     RepositoryDocument data = new RepositoryDocument();
                     data.setBinary(is,fileBytes);
-                    data.setFileName(file.getName());
-                    data.setMimeType(mapExtensionToMimeType(file.getName()));
+                    String fileName = file.getName();
+                    data.setFileName(fileName);
+                    data.setMimeType(mapExtensionToMimeType(fileName));
+                    data.setModifiedDate(new Date(file.lastModified()));
                     data.addField("uri",file.toString());
                     // MHL for other metadata
                     activities.ingestDocument(documentIdentifier,version,convertToURI(documentIdentifier),data);



Mime
View raw message