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.
Thanks – replaced with constant:

private final long TWO_MEGABYTES = 2097152;

 

- Jeff

 

From: Spencer Marks [mailto:notifications@github.com] 
Sent: Monday, June 23, 2014 7:43 AM
To: JeffBlodgett/FileSieve
Cc: Jeff Blodgett
Subject: Re: [FileSieve] FileManagement package (#5)

 

In src/test/java/FileSieve/BusinessLogic/FileManagement/ConcurrentFileManagerTest.java:

> +    }
> +
> +    @Test
> +    public void testCopyPathname() {
> +        if (deletePathnameTestsPassed == false) Assert.fail("testings of pathnameCopyProviders method depends on deletePathname testing, one or assertions for which failed");
> +
> +        // Prepare a temp folder with files and folders to copy
> +        try {
> +            Files.createDirectory(folder);          // creates folder named "swingWorkerFileManagementTestFolder" in user's temp folder
> +        } catch (SecurityException | IOException e) {
> +            Assert.fail(e.getClass().getSimpleName() + "while attempting to create \"" + folder.toFile().getName() + "\" folder in temp folder");
> +        }
> +        Path fileToCopy = new File(folder + "/fileToCopy.dat").toPath();
> +        try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(fileToCopy.toFile()))) {
> +            int aByte = 0;
> +            for (long i = 0; i < 2000000L; i++) {

no magic numbers. 

—
Reply to this email directly or view it on GitHub <https://github.com/JeffBlodgett/FileSieve/pull/5/files#r14070928> .  <https://github.com/notifications/beacon/7633920__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxOTE0MzAwMywiZGF0YSI6eyJpZCI6MzQ2NTg1MTl9fQ==--c36fb8cf4efd990140d99ed40666a8452da89a47.gif>