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() . These examples are extracted from open source projects. 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
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 2
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 3
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 4
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 5
Source Project: gradle-plugins   File: Cpio.java    License: 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 Project: gradle-plugins   File: Ar.java    License: 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 Project: gradle-plugins   File: Cpio.java    License: 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 Project: gradle-plugins   File: Ar.java    License: 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
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 10
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 11
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}
 
Example 12
public void processFile(FileCopyDetailsInternal details) {
    if (details.isDirectory()) {
        visitDir(details);
    } else {
        visitFile(details);
    }
}