package net.pterodactylus.jsite.project;
+import java.io.File;
+
/**
- * A file is an entry in a directory. Its name can contain multiple components
- * (separated by a slash, ‘/’).
+ * A file is an entry in a directory. Its name can contain multiple components,
+ * separated by the platform’s {@link File#separatorChar}.
*
* @author David ‘Bombe’ Roden <bombe@freenetproject.org>
- * @version $Id$
*/
public interface Entry {
/**
+ * Returns whether this entry denotes a virtual file. A virtual file entry
+ * is a file entry that does not have a corresponding file on the disk.
+ *
+ * @return <code>true</code> if this entry is a virtual file entry,
+ * <code>false</code> otherwise
+ */
+ public boolean isVirtual();
+
+ /**
* Returns the name of the file. The name can contain multiple path
- * components, separated by a slash (‘/’). It will never start with a slash,
- * though.
+ * components, separated by the platform’s {@link File#separatorChar}. It
+ * will never start with a separator, though.
*
* @return The name of the file
*/
public void setName(String name);
/**
+ * Returns whether this file should be inserted.
+ *
+ * @return <code>true</code> to insert the file, <code>false</code> to
+ * skip it
+ */
+ public boolean isInsert();
+
+ /**
+ * Sets whether this file should be inserted.
+ *
+ * @param insert
+ * <code>true</code> to insert the file, <code>false</code>
+ * to skip it
+ */
+ public void setInsert(boolean insert);
+
+ /**
* Returns the content type of the file. If the content type is
* <code>null</code>, the node will auto-detect the content type based on
* the filename. The content type is given as a MIME type.