This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 199806
Collapse All | Expand All

(-)a/fsbridge/build.xml (+5 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project basedir="." default="netbeans" name="fsbridge">
3
    <description>Builds, tests, and runs the project org.netbeans.modules.fsbridge</description>
4
    <import file="../nbbuild/templates/projectized.xml"/>
5
</project>
(-)a/fsbridge/manifest.mf (+5 lines)
Line 0 Link Here
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.fsbridge
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/fsbridge/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.0
5
(-)a/fsbridge/nbproject/project.properties (+2 lines)
Line 0 Link Here
1
javac.source=1.6
2
javac.compilerargs=-Xlint -Xlint:-serial
(-)a/fsbridge/nbproject/project.xml (+32 lines)
Line 0 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
2
<project xmlns="http://www.netbeans.org/ns/project/1">
3
    <type>org.netbeans.modules.apisupport.project</type>
4
    <configuration>
5
        <data xmlns="http://www.netbeans.org/ns/nb-module-project/3">
6
            <code-name-base>org.netbeans.modules.fsbridge</code-name-base>
7
            <module-dependencies>
8
                <dependency>
9
                    <code-name-base>org.netbeans.modules.dlight.nativeexecution</code-name-base>
10
                    <build-prerequisite/>
11
                    <compile-dependency/>
12
                    <run-dependency>
13
                        <specification-version>1.10.3</specification-version>
14
                    </run-dependency>
15
                </dependency>
16
                <dependency>
17
                    <code-name-base>org.openide.filesystems</code-name-base>
18
                    <build-prerequisite/>
19
                    <compile-dependency/>
20
                    <run-dependency>
21
                        <specification-version>7.47.1</specification-version>
22
                    </run-dependency>
23
                </dependency>
24
            </module-dependencies>
25
            <friend-packages>
26
                <friend>org.netbeans.modules.dlight.remote.impl</friend>
27
                <friend>org.netbeans.modules.versioning</friend>
28
                <package>org.netbeans.modules.fsbridge.spi</package>
29
            </friend-packages>
30
        </data>
31
    </configuration>
32
</project>
(-)a/fsbridge/src/org/netbeans/modules/fsbridge/Bundle.properties (+5 lines)
Line 0 Link Here
1
OpenIDE-Module-Display-Category=Infrastructure
2
OpenIDE-Module-Long-Description=\
3
    Remote File System Bridge
4
OpenIDE-Module-Name=Remote File System Bridge
5
OpenIDE-Module-Short-Description=Remote File System Bridge
(-)a/fsbridge/src/org/netbeans/modules/fsbridge/spi/Bridge.java (+106 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.fsbridge.spi;
43
44
import java.io.File;
45
import java.util.logging.Level;
46
import java.util.logging.Logger;
47
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
48
import org.openide.filesystems.FileObject;
49
import org.openide.filesystems.FileStateInvalidException;
50
import org.openide.filesystems.FileSystem;
51
52
/**
53
 *
54
 * @author Alexander Simon
55
 */
56
public final class Bridge {
57
    private Bridge() {
58
    }
59
60
    public static FileProxy createLocalFileProxy(final File file) {
61
        return new FileProxy(file.getAbsolutePath(), null);
62
    }
63
64
    public static FileProxy createFileProxy(final FileObject file) {
65
        try {
66
            FileProxyOperations fileProxyOperations = getFileProxyOperations(file.getFileSystem());
67
            if (fileProxyOperations == null) {
68
                return new FileProxy(file.getPath(), null);
69
            } else {
70
                return new FileProxy(file.getPath(), fileProxyOperations);
71
            }
72
        } catch (FileStateInvalidException ex) {
73
            Logger.getLogger(Bridge.class.getName()).log(Level.SEVERE, null, ex);
74
        }
75
        return new FileProxy(file.getPath(), null);
76
    }
77
78
    public static FileProxy createFileProxy(FileSystem fs, String path) {
79
        FileProxyOperations fileProxyOperations = getFileProxyOperations(fs);
80
        if (fileProxyOperations == null) {
81
            return new FileProxy(path, null);
82
        } else {
83
            return new FileProxy(path, fileProxyOperations);
84
        }
85
    }
86
87
    public static FileObject toFileObject(final FileProxy path) {
88
        return path.toFileObject();
89
    }
90
    
91
    public static FileProxy normalizeFile(final FileProxy file) {
92
        return file.normalizeFile();
93
    }
94
    
95
    public static ExecutionEnvironment getExecutionEnvironment(FileProxy file) {
96
        return file.getExecutionEnvironment();
97
    }
98
99
    private static FileProxyOperations getFileProxyOperations(FileSystem fs) {
100
        return (FileProxyOperations) getAttribute(fs, FileProxyOperations.ATTRIBUTE);
101
    }
102
103
    private static Object getAttribute(FileSystem fileSystem, String attrName) {
104
        return fileSystem.getRoot().getAttribute(attrName);
105
    }
106
}
(-)a/fsbridge/src/org/netbeans/modules/fsbridge/spi/FileProxy.java (+170 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.fsbridge.spi;
43
44
import java.io.File;
45
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
46
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironmentFactory;
47
import org.openide.filesystems.FileObject;
48
import org.openide.filesystems.FileUtil;
49
50
/**
51
 * Represents file on remote or local file system.
52
 *
53
 * @author Alexander Simon
54
 */
55
public final class FileProxy {
56
57
    private final String path;
58
    private final FileProxyOperations proxy;
59
60
    FileProxy(String path, FileProxyOperations proxy) {
61
        this.path = path;
62
        this.proxy = proxy;
63
    }
64
65
    public String getAbsolutePath() {
66
        return path;
67
    }
68
    
69
    public String getName() {
70
        if (proxy == null) {
71
            return new File(path).getName();
72
        } else {
73
            return proxy.getName(this);
74
        }
75
    }
76
    
77
    public boolean isDirectory() {
78
        if (proxy == null) {
79
            return new File(path).isDirectory();
80
        } else {
81
            return proxy.isDirectory(this);
82
        }
83
    }
84
    
85
    public boolean isFile() {
86
        if (proxy == null) {
87
            return new File(path).isFile();
88
        } else {
89
            return proxy.isFile(this);
90
        }
91
    }
92
    
93
    public boolean canWrite() {
94
        if (proxy == null) {
95
            return new File(path).canWrite();
96
        } else {
97
            return proxy.canWrite(this);
98
        }
99
    }
100
    
101
    public FileProxy getParentFile() {
102
        if (proxy == null) {
103
            return Bridge.createLocalFileProxy(new File(path).getParentFile());
104
        } else {
105
            return proxy.getParentFile(this);
106
        }
107
    }
108
    public boolean exists() {
109
        if (proxy == null) {
110
            return new File(path).exists();
111
        } else {
112
            return proxy.exists(this);
113
        }
114
    }
115
    
116
    @Override
117
    public String toString() {
118
        return path;
119
    }
120
121
    @Override
122
    public int hashCode() {
123
        int hash = 5;
124
        hash = 61 * hash + (this.path != null ? this.path.hashCode() : 0);
125
        hash = 61 * hash + (this.proxy != null ? this.proxy.hashCode() : 0);
126
        return hash;
127
    }
128
129
    @Override
130
    public boolean equals(Object obj) {
131
        if (obj == null) {
132
            return false;
133
        }
134
        if (getClass() != obj.getClass()) {
135
            return false;
136
        }
137
        final FileProxy other = (FileProxy) obj;
138
        if ((this.path == null) ? (other.path != null) : !this.path.equals(other.path)) {
139
            return false;
140
        }
141
        if (this.proxy != other.proxy && (this.proxy == null || !this.proxy.equals(other.proxy))) {
142
            return false;
143
        }
144
        return true;
145
    }
146
147
    ExecutionEnvironment getExecutionEnvironment() {
148
        if (proxy == null) {
149
            return ExecutionEnvironmentFactory.getLocal();
150
        } else {
151
            return proxy.getExecutionEnvironment();
152
        }
153
    }
154
155
    FileObject toFileObject() {
156
        if (proxy == null) {
157
            return FileUtil.toFileObject(new File(FileUtil.normalizePath(path)));
158
        } else {
159
            return proxy.toFileObject(this);
160
        }
161
    }
162
163
    FileProxy normalizeFile() {
164
        if (proxy == null) {
165
            return new FileProxy(FileUtil.normalizePath(path), null);
166
        } else {
167
            return proxy.normalize(this);
168
        }
169
    }
170
}
(-)a/fsbridge/src/org/netbeans/modules/fsbridge/spi/FileProxyOperations.java (+73 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.fsbridge.spi;
43
44
import org.netbeans.modules.nativeexecution.api.ExecutionEnvironment;
45
import org.openide.filesystems.FileObject;
46
47
/**
48
 *
49
 * @author Vladimir Voskresensky
50
 */
51
public interface FileProxyOperations {
52
    public static final String ATTRIBUTE = "FileProxyOperations";
53
    
54
    String getName(FileProxy file);
55
    
56
    boolean isDirectory(FileProxy file);
57
    
58
    boolean isFile(FileProxy file);
59
    
60
    boolean canWrite(FileProxy file);
61
    
62
    FileProxy getParentFile(FileProxy file);
63
64
    String getAbsolutePath(FileProxy file);
65
    
66
    boolean exists(FileProxy file);
67
68
    ExecutionEnvironment getExecutionEnvironment();
69
70
    FileProxy normalize(FileProxy file);
71
72
    FileObject toFileObject(FileProxy path);
73
}
(-)a/fsbridge/src/org/netbeans/modules/fsbridge/spi/FileProxyOperationsInterceptor.java (+213 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2011 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2011 Sun Microsystems, Inc.
41
 */
42
package org.netbeans.modules.fsbridge.spi;
43
44
import java.io.IOException;
45
import java.util.List;
46
import org.openide.filesystems.FileObject;
47
48
/**
49
 * Extension of {@link org.netbeans.modules.masterfs.providers.ProvidedExtensions} to process remote file operations.
50
 * 
51
 * @author Alexander Simon
52
 */
53
public interface FileProxyOperationsInterceptor {
54
    
55
    public interface FileProxyIOHandler {
56
        /**
57
         * @throws java.io.IOException if handled operation isn't successful
58
         */
59
        void handle() throws IOException;
60
    }
61
    
62
    public interface FileProxyDeleteHandler {
63
        /**
64
         * Deletes the file or directory denoted by this abstract pathname.  If
65
         * this pathname denotes a directory, then the directory must be empty in
66
         * order to be deleted.
67
         *
68
         * @return  <code>true</code> if and only if the file or directory is
69
         *          successfully deleted; <code>false</code> otherwise
70
         */
71
        boolean delete(FileProxy file);
72
    }
73
    
74
75
    /**
76
     * Return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler}
77
     * that is responsible for copying the file or null.
78
     *
79
     * Just the first non null instance of <code>FileProxyIOHandler</code> is used by
80
     *  <code>RemoteFileSystem</code>
81
     *
82
     * @param from file to be copied
83
     * @param to target to copy this file to
84
     * @return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler}
85
     * that is responsible for copying the file or null
86
     */
87
    FileProxyOperationsInterceptor.FileProxyIOHandler getCopyHandler(FileProxy from, FileProxy to);
88
89
    /**
90
     * Return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler}
91
     * that is responsible for moving the file or null.
92
     *
93
     * Just the first non null instance of <code>FileProxyIOHandler</code> is used by
94
     *  <code>RemoteFileSystem</code>
95
     *
96
     * @param from file to be moved
97
     * @param to target to move this file to
98
     * @return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler} 
99
     * that is responsible for moving the file or null
100
     */
101
    FileProxyOperationsInterceptor.FileProxyIOHandler getMoveHandler(FileProxy from, FileProxy to);
102
    
103
    /*
104
     * Return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler}
105
     * that is responsible for renaming the file or null.
106
     *
107
     * Just the first non null instance of <code>FileProxyIOHandler</code> is used by
108
     *  <code>RemoteFileSystem</code>
109
     *
110
     * @param from file to be renamed
111
     * @param newName new name of file
112
     * @return instance of {@link FileProxyOperationsInterceptor.FileProxyIOHandler} 
113
     * that is responsible for renaming the file or null
114
     */
115
    FileProxyOperationsInterceptor.FileProxyIOHandler getRenameHandler(FileProxy from, String newName);
116
117
    /*
118
     * Return instance of {@link FileProxyOperationsInterceptor.FileProxyDeleteHandler}
119
     * that is responsible for deleting the file or null.
120
     *
121
     * Just the first non null instance of <code>FileProxyDeleteHandler</code> is used by
122
     *  <code>RemoteFileSystem</code>
123
     *
124
     * @param f file or folder to be deleted
125
     * @return instance of {@link FileProxyOperationsInterceptor.FileProxyDeleteHandler} 
126
     * that is responsible for deleting the file or null
127
     */    
128
    FileProxyOperationsInterceptor.FileProxyDeleteHandler getDeleteHandler(FileProxy f);
129
    
130
    /**
131
     * Called by <code>RemoteFileSystem</code> before <code>FileObject</code>
132
     * is copied
133
     * @param from FileObject to be moved
134
     * @param to FileProxy target to move this file to
135
     */
136
    void beforeCopy(FileObject from, FileProxy to);
137
138
    /**
139
     * Called by <code>RemoteFileSystem</code> after <code>FileObject</code>
140
     * was successfully copied
141
     * @param from FileObject to be moved
142
     * @param to FileProxy target to move this file to
143
     */
144
    void copySuccess(FileObject from, FileProxy to);
145
146
    /**
147
     * Called by <code>RemoteFileSystem</code> after a <code>FileObject</code>
148
     * copy failed
149
     * @param from FileObject to be moved
150
     * @param to FileProxy target to move this file to
151
     */
152
    void copyFailure(FileObject from, FileProxy to);
153
154
    /**
155
     * Called by <code>RemoteFileSystem</code> before <code>FileObject</code>
156
     * is moved
157
     * @param from FileObject to be moved
158
     * @param to FileProxy target to move this file to
159
     */
160
    void beforeMove(FileObject from, FileProxy to);
161
162
    /**
163
     * Called by <code>RemoteFileSystem</code> after <code>FileObject</code>
164
     * was successfully
165
     * @param from FileObject to be moved
166
     * @param to FileProxy target to move this file to
167
     */
168
    void moveSuccess(FileObject from, FileProxy to);
169
170
    /**
171
     * Called by <code>RemoteFileSystem</code> after a <code>FileObject</code>
172
     * move failed
173
     * @param from FileObject to be moved
174
     * @param to FileProxy target to move this file to
175
     */
176
    void moveFailure(FileObject from, FileProxy to);
177
178
    /**
179
     * Called by <code>RemoteFileSystem</code> when <code>FileObject</code> is queried for writability with the
180
     * canWrite() method.
181
     * 
182
     * @param f a FileProxy to query
183
     * @return true if the file can be written to, deleted or moved, false otherwise
184
     */
185
    boolean canWrite(FileProxy f);
186
187
    /**
188
     * Called by {@code RemoteFileSystem} when {@code FileObject} is
189
     * queried for attribute and attribute's name starts with {@code ProvidedExtensions}
190
     * prefix.
191
     * @param attrName name of attribute
192
     * @return value of attribute
193
     */
194
    Object getAttribute(FileProxy file, String attrName);
195
196
    /** Allows versioning system to exclude some children from recursive
197
     * listening check. Also notifies the versioning whenever a refresh
198
     * is required and allows the versiniong to provide special timestamp
199
     * for a directory.
200
     * <p>
201
     * Default implementation of this method returns -1.
202
     *
203
     * @param dir the directory to check timestamp for
204
     * @param lastTimeStamp the previously known timestamp or -1
205
     * @param children add subfiles that shall be iterated into this array
206
     * @return the timestamp that shall represent this directory, it will
207
     *   be compared with timestamps of all children and the newest
208
     *   one will be kept and next time passed as lastTimeStamp. Return
209
     *   0 if the directory does not have any special timestamp. Return
210
     *   -1 if you are not providing any special implementation
211
     */
212
    long refreshRecursively(FileProxy dir, long lastTimeStamp, List<? super FileProxy> children);
213
}

Return to bug 199806