FileManagement package

Lots of work this past week on the FileManagement package.  Not yet finished, but getting close.  Note that JavaDoc comments are in need of tweaking and should not be trusted.
Yup – thanks for these comments!  Fixing now.  And (yikes) I am no longer encompassing the assertion “sets” (which I will break into different tests) in all-encompassing try blocks that ignore (eat) IOExcetions… this implementation of FileManager may have a copyPathname implementation that does not throw IOExceptions but other methods used in the test might!

 

From: Spencer Marks [mailto:notifications@github.com] 
Sent: Monday, June 23, 2014 7:44 AM
To: JeffBlodgett/FileSieve
Cc: Jeff Blodgett
Subject: Re: [FileSieve] FileManagement package (#5)

 

In src/test/java/FileSieve/BusinessLogic/FileManagement/ConcurrentFileManagerTest.java:

> +     * @param pathname  pathname (folder or file) to search
> +     * @return          number of files and subfolders found within the given pathname
> +     */
> +    private int getChildCount(Path pathname) {
> +        int count = 0;
> +
> +        try (DirectoryStream<Path> dirStream = Files.newDirectoryStream(pathname);) {
> +            for (Path path : dirStream) {
> +                if (Files.isRegularFile(path, LinkOption.NOFOLLOW_LINKS)) {
> +                    count++;
> +                } else if (Files.isDirectory(path)) {
> +                    count += 1 + getChildCount(path);
> +                }
> +            }
> +        } catch (IOException e) {
> +            // Ignore exceptions

Ack, see previous comment about this. This really needs to be fixed. 

—
Reply to this email directly or view it on GitHub <https://github.com/JeffBlodgett/FileSieve/pull/5/files#r14070969> .  <https://github.com/notifications/beacon/7633920__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTE0MzAzMiwiZGF0YSI6eyJpZCI6MzQ2NTg1MTl9fQ==--196a18a4cc250b0c93b3d54ada8b3a75a46bfd01.gif>