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

com.github.cleydyr.dart.system.io.PosixDartSassExecutableExtractor Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package com.github.cleydyr.dart.system.io;

import com.github.cleydyr.dart.release.DartSassReleaseParameter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.PosixFilePermission;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashSet;

public abstract class PosixDartSassExecutableExtractor extends AbstractDartSassExecutableExtractor {

    public PosixDartSassExecutableExtractor(
            DartSassReleaseParameter dartSassReleaseParameter,
            ExecutableResourcesProvider executableResourcesProvider,
            Collection resourceNames) {
        super(dartSassReleaseParameter, executableResourcesProvider, resourceNames);
    }

    private static final HashSet PERMISSION_SET =
            new HashSet<>(Arrays.asList(PosixFilePermission.OWNER_EXECUTE, PosixFilePermission.OWNER_READ));

    @Override
    public void setResourcePermissions(Path resourcePath) throws IOException {
        Files.setPosixFilePermissions(resourcePath, PERMISSION_SET);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy