projects
/
jSite2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reformat
[jSite2.git]
/
src
/
net
/
pterodactylus
/
jsite
/
project
/
ProjectFile.java
diff --git
a/src/net/pterodactylus/jsite/project/ProjectFile.java
b/src/net/pterodactylus/jsite/project/ProjectFile.java
index
1a8738a
..
7f9cc2d
100644
(file)
--- a/
src/net/pterodactylus/jsite/project/ProjectFile.java
+++ b/
src/net/pterodactylus/jsite/project/ProjectFile.java
@@
-28,22
+28,30
@@
import net.pterodactylus.jsite.core.Core;
* Abstraction for a that exists on the machine {@link Core} is being run on.
* This abstraction layer exists to make it possible to run jSite as a daemon
* and only connect to it via network.
* Abstraction for a that exists on the machine {@link Core} is being run on.
* This abstraction layer exists to make it possible to run jSite as a daemon
* and only connect to it via network.
- *
+ *
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public interface ProjectFile {
/**
* Returns the name of the file.
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
*/
public interface ProjectFile {
/**
* Returns the name of the file.
- *
+ *
* @return The name of the file
*/
public String getName();
/**
* @return The name of the file
*/
public String getName();
/**
+ * Returns the parent of this project file.
+ *
+ * @return The parent of this project file, or <code>null</code> if this
+ * project file does not have a parent
+ */
+ public ProjectFile getParent();
+
+ /**
* Returns all parent files of this file. This file is the last file in the
* returned list.
* Returns all parent files of this file. This file is the last file in the
* returned list.
- *
+ *
* @return A list of all parents of this file and this file itself
*/
public List<ProjectFile> getParents();
* @return A list of all parents of this file and this file itself
*/
public List<ProjectFile> getParents();
@@
-51,14
+59,23
@@
public interface ProjectFile {
/**
* Returns the complete path of this file, without a leading
* {@link File#separator}.
/**
* Returns the complete path of this file, without a leading
* {@link File#separator}.
- *
+ *
* @return The complete path of this file
*/
public String getCompletePath();
/**
* @return The complete path of this file
*/
public String getCompletePath();
/**
+ * Returns the size of the file. If this file is a directory, the returned
+ * value is unspecified.
+ *
+ * @see File#length()
+ * @return The size of the file
+ */
+ public long getSize();
+
+ /**
* Returns whether this file is a directory.
* Returns whether this file is a directory.
- *
+ *
* @return <code>true</code> if this file is a directory,
* <code>false</code> otherwise
*/
* @return <code>true</code> if this file is a directory,
* <code>false</code> otherwise
*/
@@
-66,7
+83,7
@@
public interface ProjectFile {
/**
* Returns whether this file is a file (as opposed to being a directory).
/**
* Returns whether this file is a file (as opposed to being a directory).
- *
+ *
* @return <code>true</code> if this file is a file, <code>false</code>
* otherwise
*/
* @return <code>true</code> if this file is a file, <code>false</code>
* otherwise
*/
@@
-74,14
+91,14
@@
public interface ProjectFile {
/**
* Returns whether this file is hidden.
/**
* Returns whether this file is hidden.
- *
+ *
* @return <code>true</code> if this file is hidden
*/
public boolean isHidden();
/**
* If this file is a directory, returns all files in this directory.
* @return <code>true</code> if this file is hidden
*/
public boolean isHidden();
/**
* If this file is a directory, returns all files in this directory.
- *
+ *
* @see #isDirectory()
* @return All files in this directory if this file is a directory, or
* <code>null</code> if this file is not a directory
* @see #isDirectory()
* @return All files in this directory if this file is a directory, or
* <code>null</code> if this file is not a directory