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

org.freedesktop.dbus.transport.jre.UnixBusAddress Maven / Gradle / Ivy

There is a newer version: 5.1.0
Show newest version
package org.freedesktop.dbus.transport.jre;

import org.freedesktop.dbus.connections.BusAddress;
import org.freedesktop.dbus.connections.transports.IFileBasedBusAddress;
import org.freedesktop.dbus.utils.Util;

import java.nio.file.Path;
import java.nio.file.attribute.PosixFilePermission;
import java.util.Set;

public class UnixBusAddress extends BusAddress implements IFileBasedBusAddress {

    public UnixBusAddress(BusAddress _obj) {
        super(_obj);
    }

    public boolean hasPath() {
        return hasParameter("path");
    }

    public String getPath() {
        return getParameterValue("path");
    }

    @Override
    public void updatePermissions(String _fileOwner, String _fileGroup, Set _fileUnixPermissions) {
        Util.setFilePermissions(Path.of(getPath()), _fileOwner, _fileGroup, _fileUnixPermissions);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy