Package org.appng.cli.commands
Class FileOwner
- java.lang.Object
-
- org.appng.cli.commands.FileOwner
-
public class FileOwner extends Object
Utility class to set the owner and group for a givenFile
using thechown
system command.- Author:
- Matthias Müller
- See Also:
OperatingSystem.isLinux()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
own(String user, String group)
Set the owner and group for theFile
which has been passed to the constructor, using thechown
system command.
-
-
-
Method Detail
-
own
public boolean own(String user, String group)
Set the owner and group for theFile
which has been passed to the constructor, using thechown
system command. Works only on linux operating systems (seeOperatingSystem.isLinux()
).- Parameters:
user
- the owner (user) to setgroup
- the group to set- Returns:
true
if setting the user/group was successful,false
otherwise
-
-