}
/**
+ * {@inheritDoc}
+ */
+ /* TODO - caching? */
+ public String getCompletePath() {
+ StringBuilder completePath = new StringBuilder();
+ ProjectFileImpl currentProjectFile = this;
+ do {
+ completePath.insert(0, File.separatorChar).insert(0, this.getName());
+ } while ((currentProjectFile = currentProjectFile.parentProjectFile) != null);
+ return completePath.substring(1);
+ }
+
+ /**
* @see net.pterodactylus.jsite.project.ProjectFile#isFile()
*/
public boolean isFile() {
package net.pterodactylus.jsite.project;
+import java.io.File;
import java.util.List;
import net.pterodactylus.jsite.core.Core;
public List<ProjectFile> getParents();
/**
+ * Returns the complete path of this file, without a leading
+ * {@link File#separator}.
+ *
+ * @return The complete path of this file
+ */
+ public String getCompletePath();
+
+ /**
* Returns whether this file is a directory.
*
* @return <code>true</code> if this file is a directory,