Skip to content

Commit

Permalink
Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 23, 2023
1 parent a01bbfb commit 89ef772
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ private void doDelete(final FileEntry entry) {
}

/**
* Lists the files
* Lists the files in {@code file}.
*
* @param file The file to list files for
* @param entry the parent entry
* @return The child files
Expand Down Expand Up @@ -429,14 +430,14 @@ public void initialize() throws Exception {
/**
* Lists the contents of a directory
*
* @param file The file to list the contents of
* @param directory The directory to list.
* @return the directory contents or a zero length array if
* the empty or the file is not a directory
*/
private File[] listFiles(final File file) {
private File[] listFiles(final File directory) {
File[] children = null;
if (file.isDirectory()) {
children = file.listFiles(fileFilter);
if (directory.isDirectory()) {
children = directory.listFiles(fileFilter);
}
if (children == null) {
children = FileUtils.EMPTY_FILE_ARRAY;
Expand Down
19 changes: 17 additions & 2 deletions src/main/java/org/apache/commons/io/monitor/FileEntry.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,28 @@ public class FileEntry implements Serializable {

static final FileEntry[] EMPTY_FILE_ENTRY_ARRAY = {};

/** The parent. */
private final FileEntry parent;

/** My children. */
private FileEntry[] children;

/** Monitored file. */
private final File file;

/** Monitored file name. */
private String name;

/** Whether the file exists. */
private boolean exists;

/** Whether the file is a directory or not. */
private boolean directory;

/** The file's last modified timestamp. */
private SerializableFileTime lastModified = SerializableFileTime.EPOCH;

/** The file's length. */
private long length;

/**
Expand All @@ -78,8 +93,8 @@ public FileEntry(final File file) {
/**
* Constructs a new monitor for a specified {@link File}.
*
* @param parent The parent
* @param file The file being monitored
* @param parent The parent.
* @param file The file being monitored.
*/
public FileEntry(final FileEntry parent, final File file) {
this.file = Objects.requireNonNull(file, "file");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
public class StringBuilderWriter extends Writer implements Serializable {

private static final long serialVersionUID = -146927496096066153L;

/** The append target. */
private final StringBuilder builder;

/**
Expand Down

0 comments on commit 89ef772

Please sign in to comment.