KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > core > filesystem > provider > FileTree


1 /*******************************************************************************
2  * Copyright (c) 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.core.filesystem.provider;
12
13 import org.eclipse.core.filesystem.*;
14
15 /**
16  * The abstract superclass of all {@link IFileTree} implementations.
17  * <p>
18  * Clients may subclass this class to provide a file tree for their particular
19  * file system.
20  * </p>
21  *
22  * @since org.eclipse.core.filesystem 1.0
23  */

24 public abstract class FileTree implements IFileTree {
25
26     /**
27      * The root of the file tree
28      */

29     protected IFileStore treeRoot;
30
31     /**
32      * Creates a new file tree with tree root as the root
33      * @param treeRoot the file store that is to act as the root of their FileTree
34      */

35     public FileTree(IFileStore treeRoot) {
36         this.treeRoot = treeRoot;
37     }
38
39     public IFileStore getTreeRoot() {
40         return treeRoot;
41     }
42
43     /* (non-Javadoc)
44      * @see org.eclipse.core.filesystem.IFileTree#getChildrenFileInfos(org.eclipse.core.filesystem.IFileStore)
45      */

46     public abstract IFileInfo[] getChildInfos(IFileStore store);
47
48     /*(non-Javadoc)
49      * @see org.eclipse.core.filesystem.IFileTree#getFileInfo(org.eclipse.core.filesystem.IFileStore)
50      */

51     public abstract IFileInfo getFileInfo(IFileStore store);
52
53     /* (non-Javadoc)
54      * @see org.eclipse.core.filesystem.IFileTree#getChildrenFileStores(org.eclipse.core.filesystem.IFileStore)
55      */

56     public abstract IFileStore[] getChildStores(IFileStore store);
57
58 }
59
Popular Tags