All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eowise.imagemagick.params.ComputedFileParam.groovy Maven / Gradle / Ivy

The newest version!
package com.eowise.imagemagick.params

import org.gradle.api.Project
import org.gradle.api.file.FileVisitDetails

/**
 * Created by aurel on 14/12/13.
 */
class ComputedFileParam implements Param {

    Project project
    Closure output
    Closure rename


    ComputedFileParam(Project project, Closure output) {
        this(project, output, { name, extension -> "${name}.${extension}"});
    }

    ComputedFileParam(Project project, Closure output, Closure rename) {
        this.project = project;
        this.output = output;
        this.rename = rename;
    }

    @Override
    LinkedList toParams(FileVisitDetails details) {

        String name = details.getName()[0..




© 2015 - 2024 Weber Informatics LLC | Privacy Policy