You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by st...@apache.org on 2004/09/30 13:57:12 UTC
svn commit: rev 47577 - in incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs: . local
Author: stefan
Date: Thu Sep 30 04:57:12 2004
New Revision: 47577
Modified:
incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/BasedFileSystem.java
incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystem.java
incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/local/LocalFileSystem.java
Log:
added touch(String) method to FileSystem (to enable its use as lucene store)
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/BasedFileSystem.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/BasedFileSystem.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/BasedFileSystem.java Thu Sep 30 04:57:12 2004
@@ -169,6 +169,13 @@
}
/**
+ * @see FileSystem#touch
+ */
+ public void touch(String filePath) throws FileSystemException {
+ fsBase.touch(buildBasePath(filePath));
+ }
+
+ /**
* @see FileSystem#list
*/
public String[] list(String folderPath) throws FileSystemException {
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystem.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystem.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystem.java Thu Sep 30 04:57:12 2004
@@ -148,6 +148,14 @@
public long lastModified(String path) throws FileSystemException;
/**
+ * Set the modified time of an existing file to now.
+ *
+ * @param filePath the path of the file.
+ * @throws FileSystemException if the path does not denote an existing file.
+ */
+ public void touch(String filePath) throws FileSystemException;
+
+ /**
* Returns an array of strings naming the files and folders
* in the folder denoted by this path.
*
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/FileSystemResource.java Thu Sep 30 04:57:12 2004
@@ -167,6 +167,13 @@
}
/**
+ * @see FileSystem#touch
+ */
+ public void touch() throws FileSystemException {
+ fs.touch(path);
+ }
+
+ /**
* @see FileSystem#move
*/
public void move(String destPath) throws FileSystemException {
Modified: incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/local/LocalFileSystem.java
==============================================================================
--- incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/local/LocalFileSystem.java (original)
+++ incubator/jackrabbit/trunk/src/java/org/apache/jackrabbit/core/fs/local/LocalFileSystem.java Thu Sep 30 04:57:12 2004
@@ -260,6 +260,14 @@
}
/**
+ * @see FileSystem#touch(String)
+ */
+ public void touch(String filePath) throws FileSystemException {
+ File f = new File(root, osPath(filePath));
+ f.setLastModified(System.currentTimeMillis());
+ }
+
+ /**
* @see FileSystem#list(String)
*/
public String[] list(String folderPath) throws FileSystemException {