Oops, did not meet to commit those as part of the Javadoc cleanup.
DELETE
src/main/java/org/apache/commons/io/file/attribute/BasicFileAttributesPrinter.java
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.file.attribute;
-
-import java.io.IOException;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.attribute.BasicFileAttributes;
-import java.util.Objects;
-
-import org.apache.commons.io.file.PathUtils;
-
-/**
- * Prints {@link BasicFileAttributes} allowing for custom formats.
- *
- * @since 2.9.0
- */
-public class BasicFileAttributesPrinter {
-
- /**
- * Prints the {@link BasicFileAttributes} for the given {@link Path} strings.
- *
- * @param args {@link Path} strings.
- */
- public static void main(String[] args) {
- for (String arg : args) {
- try {
- final Path path = Paths.get(arg);
- System.out.print(path);
- System.out.print(": ");
- System.out.println(toString(readBasicFileAttributes(path)));
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
-
- private static BasicFileAttributes readBasicFileAttributes(final Path path) throws IOException {
- return PathUtils.readBasicFileAttributes(path);
- }
-
- private static final String FORMAT_FULL = "D%s O%s F%s S%s %s %s %s %,9d %s";
- private static final String FORMAT_FILE = "S%s %s %s %s %,9d %s";
- private static final String FORMAT_DIR = "S%s %s %s %s %,9d %s";
- private static final String EMPTY = "";
-
- private static char toSign(final boolean value) {
- return toSign(value, '+', '-');
- }
-
- private static char toSign(final boolean value, char trueChar, char falseChar) {
- return value ? trueChar : falseChar;
- }
-
- public static String toDirString(final BasicFileAttributes attributes) {
- if (attributes == null) {
- return EMPTY;
- }
- // Convert FileTime to instant for constant-width formatting.
- // @formatter:off
- return String.format(FORMAT_DIR,
- toSign(attributes.isSymbolicLink()),
- attributes.creationTime().toInstant(),
- attributes.lastAccessTime().toInstant(),
- attributes.lastModifiedTime().toInstant(),
- attributes.size(),
- Objects.toString(attributes.fileKey(), EMPTY)
- );
- // @formatter:on
- }
-
- public static String toFileString(final BasicFileAttributes attributes) {
- if (attributes == null) {
- return EMPTY;
- }
- // Convert FileTime to instant for constant-width formatting.
- // @formatter:off
- return String.format(FORMAT_FILE,
- toSign(attributes.isSymbolicLink()),
- attributes.creationTime().toInstant(),
- attributes.lastAccessTime().toInstant(),
- attributes.lastModifiedTime().toInstant(),
- attributes.size(),
- Objects.toString(attributes.fileKey(), EMPTY)
- );
- // @formatter:on
- }
-
- public static String toString(final BasicFileAttributes attributes) {
- if (attributes == null) {
- return EMPTY;
- }
- // Convert FileTime to instant for constant-width formatting.
- // @formatter:off
- return String.format(FORMAT_FULL,
- toSign(attributes.isDirectory()),
- toSign(attributes.isOther()),
- toSign(attributes.isRegularFile()),
- toSign(attributes.isSymbolicLink()),
- attributes.creationTime().toInstant(),
- attributes.lastAccessTime().toInstant(),
- attributes.lastModifiedTime().toInstant(),
- attributes.size(),
- Objects.toString(attributes.fileKey(), EMPTY)
- );
- // @formatter:on
- }
-
-}

DELETE
src/main/java/org/apache/commons/io/file/attribute/package.html
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<!--
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
--->
-<html>
-<body>
- <p>This package provides extensions in the realm of java.nio.file.attribute.</p>
-</body>
-</html>

DELETE
src/main/java/org/apache/commons/io/filefilter/AbstractMethodFileFilter.java
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.filefilter;
-
-import java.util.Arrays;
-
-public abstract class AbstractMethodFileFilter extends AbstractFileFilter {
-
- private final boolean checkDirPost;
- private final boolean checkDirPre;
- private final boolean checkFile;
- private final boolean checkFileFailed;
-
- public AbstractMethodFileFilter(final FileVisitorMethod... fileVisitorMethod) {
- final FileVisitorMethod[] actual = (fileVisitorMethod == null || fileVisitorMethod.length == 0
- ? FileVisitorMethod.values()
- : fileVisitorMethod).clone();
- Arrays.sort(actual);
- this.checkFile = Arrays.binarySearch(actual, FileVisitorMethod.FILE) >= 0;
- this.checkFileFailed = Arrays.binarySearch(actual, FileVisitorMethod.FILE_FAILED) >= 0;
- this.checkDirPre = Arrays.binarySearch(actual, FileVisitorMethod.PRE_DIR) >= 0;
- this.checkDirPost = Arrays.binarySearch(actual, FileVisitorMethod.POST_DIR) >= 0;
-
- }
-
- public boolean isCheckDirPost() {
- return checkDirPost;
- }
-
- public boolean isCheckDirPre() {
- return checkDirPre;
- }
-
- public boolean isCheckFile() {
- return checkFile;
- }
-
- public boolean isCheckFileFailed() {
- return checkFileFailed;
- }
-}

DELETE
src/main/java/org/apache/commons/io/filefilter/FileVisitorMethod.java
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.filefilter;
-
-import java.io.IOException;
-import java.nio.file.FileVisitor;
-import java.nio.file.attribute.BasicFileAttributes;
-
-/**
- * Enumerates visitation methods from {@link FileVisitor}.
- *
- * @since 2.9.0
- * @see FileVisitor
- */
-public enum FileVisitorMethod {
-
- /**
- * Matches {@link FileVisitor#visitFile(Object, BasicFileAttributes)}.
- */
- FILE,
-
- /**
- * Matches {@link FileVisitor#visitFileFailed(Object, IOException)}.
- */
- FILE_FAILED,
-
- /**
- * Matches {@link FileVisitor#postVisitDirectory(Object, IOException)}.
- */
- POST_DIR,
-
- /**
- * Matches {@link FileVisitor#preVisitDirectory(Object, BasicFileAttributes)}.
- */
- PRE_DIR
-}
\ No newline at end of file

DELETE
src/main/java/org/apache/commons/io/filefilter/PrintStreamFileFilter.java
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.filefilter;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.nio.file.FileVisitResult;
-import java.nio.file.Path;
-import java.nio.file.Paths;
-import java.nio.file.attribute.BasicFileAttributes;
-
-import org.apache.commons.io.file.PathUtils;
-import org.apache.commons.io.file.attribute.BasicFileAttributesPrinter;
-
-public class PrintStreamFileFilter extends AbstractMethodFileFilter {
-
- public static void main(final String[] args) {
- final Path directory = args.length == 0 ? PathUtils.current() : Paths.get(args[0]);
- try {
- PathUtils.visitFileTree(PrintStreamFileFilter.systemOut(), directory);
- } catch (final IOException e) {
- e.printStackTrace();
- }
- }
-
- public static PrintStreamFileFilter systemOut() {
- return new PrintStreamFileFilter(System.out, FileVisitorMethod.FILE, FileVisitorMethod.PRE_DIR);
- }
-
- private final String dirPostExFormat = "Post %s: %s%n";
- private final String dirPostFormat = "Directory: %s%n";
- private final String dirPreAttrFormat = "Directory: %s %s%n";
- private final String dirPreFormat = "Pre %s%n";
- private final String fileAttrFormat = "%s %s%n";
- private final String fileFailFormat = "%s: %s%n";
- private final String fileFormat = "%s%n";
- private final boolean printAttributes;
- private final PrintStream printStream;
-
- public PrintStreamFileFilter(final PrintStream printStream, final FileVisitorMethod... fileVisitorMethod) {
- super(fileVisitorMethod);
- this.printStream = printStream;
- this.printAttributes = true;
- }
-
- @Override
- public boolean accept(final File file) {
- if (isCheckFile()) {
- printFile(file, null);
- }
- return true;
- }
-
- @Override
- protected FileVisitResult handle(final Throwable t) {
- printStream.println(t);
- return FileVisitResult.TERMINATE;
- }
-
- @Override
- public FileVisitResult accept(final Path file, final BasicFileAttributes attributes) {
- if (isCheckFile()) {
- printFile(file, attributes);
- }
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult postVisitDirectory(final Path dir, final IOException exc) throws IOException {
- if (isCheckDirPost()) {
- if (exc == null) {
- printStream.printf(dirPostFormat, dir);
- } else {
- printStream.printf(dirPostExFormat, dir, exc);
- }
- }
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult preVisitDirectory(final Path dir, final BasicFileAttributes attributes) throws IOException {
- if (isCheckDirPre()) {
- if (printAttributes(attributes)) {
- printStream.printf(dirPreFormat, dir);
- } else {
- printStream.printf(dirPreAttrFormat, dir, BasicFileAttributesPrinter.toFileString(attributes));
- }
- }
- return FileVisitResult.CONTINUE;
- }
-
- private boolean printAttributes(final BasicFileAttributes attributes) {
- return attributes == null || !printAttributes;
- }
-
- private void printFile(final Object file, final BasicFileAttributes attributes) {
- if (printAttributes(attributes)) {
- printStream.printf(fileFormat, file);
- } else {
- printStream.printf(fileAttrFormat, BasicFileAttributesPrinter.toFileString(attributes), file);
- }
- }
-
- @Override
- public FileVisitResult visitFile(final Path file, final BasicFileAttributes attributes) throws IOException {
- if (isCheckFile()) {
- printFile(file, attributes);
- }
- return FileVisitResult.CONTINUE;
- }
-
- @Override
- public FileVisitResult visitFileFailed(final Path file, final IOException exc) throws IOException {
- if (isCheckFileFailed()) {
- printStream.printf(fileFailFormat, file, exc);
- }
- return FileVisitResult.CONTINUE;
- }
-}

DELETE
src/test/java/org/apache/commons/io/file/attribute/BasicFileAttributesPrinterTest.java
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.commons.io.file.attribute;
-
-import org.junit.jupiter.api.Test;
-
-/**
- * Tests {@link BasicFileAttributesPrinter}.
- */
-public class BasicFileAttributesPrinterTest {
-
- @Test
- public void test() {
-
- }
-}

Oops, did not meet to commit those as part of the Javadoc cleanup.