Java Code Examples for org.gradle.api.internal.file.copy.FileCopyDetailsInternal#isDirectory()

The following examples show how to use org.gradle.api.internal.file.copy.FileCopyDetailsInternal#isDirectory() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TarCopyAction.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 2
Source File: ZipCopyAction.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 3
Source File: TarCopyAction.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 4
Source File: ZipCopyAction.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 5
Source File: Cpio.java    From gradle-plugins with MIT License 5 votes vote down vote up
@Override
@SneakyThrows
public void processFile(FileCopyDetailsInternal details) {
    CpioArchiveEntry archiveEntry = new CpioArchiveEntry(format, details.getPath());

    archiveEntry.setTime(details.getLastModified());

    if (details.isDirectory()) {
        archiveEntry.setMode(CpioConstants.C_ISDIR);
    } else {
        archiveEntry.setMode(CpioConstants.C_ISREG);
        archiveEntry.setSize(details.getSize());
    }

    try {
        outputFile.putArchiveEntry(archiveEntry);
    } catch (IOException e) {
        log.error(e.getMessage());
        throw e;
    }

    if (!details.isDirectory()) {
        details.copyTo(outputFile);
    }

    outputFile.closeArchiveEntry();
}
 
Example 6
Source File: Ar.java    From gradle-plugins with MIT License 5 votes vote down vote up
@Override
@SneakyThrows
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        return;
    }

    ArArchiveEntry archiveEntry = new ArArchiveEntry(
            details.getPath(),
            details.getSize(),
            0,
            0,
            33188,
            details.getLastModified() / 1000
    );

    try {
        outputFile.putArchiveEntry(archiveEntry);
    } catch (IOException e) {
        log.error(e.getMessage());
        throw e;
    }

    details.copyTo(outputFile);

    outputFile.closeArchiveEntry();
}
 
Example 7
Source File: Cpio.java    From gradle-plugins with MIT License 5 votes vote down vote up
@Override
@SneakyThrows
public void processFile(FileCopyDetailsInternal details) {
    CpioArchiveEntry archiveEntry = new CpioArchiveEntry(format, details.getPath());

    archiveEntry.setTime(details.getLastModified());

    if (details.isDirectory()) {
        archiveEntry.setMode(CpioConstants.C_ISDIR);
    } else {
        archiveEntry.setMode(CpioConstants.C_ISREG);
        archiveEntry.setSize(details.getSize());
    }

    try {
        outputFile.putArchiveEntry(archiveEntry);
    } catch (IOException e) {
        log.error(e.getMessage());
        throw e;
    }

    if (!details.isDirectory()) {
        details.copyTo(outputFile);
    }

    outputFile.closeArchiveEntry();
}
 
Example 8
Source File: Ar.java    From gradle-plugins with MIT License 5 votes vote down vote up
@Override
@SneakyThrows
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        return;
    }

    ArArchiveEntry archiveEntry = new ArArchiveEntry(
            details.getPath(),
            details.getSize(),
            0,
            0,
            33188,
            details.getLastModified() / 1000
    );

    try {
        outputFile.putArchiveEntry(archiveEntry);
    } catch (IOException e) {
        log.error(e.getMessage());
        throw e;
    }

    details.copyTo(outputFile);

    outputFile.closeArchiveEntry();
}
 
Example 9
Source File: TarCopyAction.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 10
Source File: ZipCopyAction.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 11
Source File: TarCopyAction.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 12
Source File: ZipCopyAction.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}