Class UserService
java.lang.Object
io.github.eggy03.ferrumx.windows.service.user.UserService
Service class for fetching the current system user information.
This class retrieves the current user's details such as username, home directory, and working directory using standard Java system properties.
Usage example
UserService userService = new UserService();
User currentUser = userService.getUser();
System.out.println(currentUser);
- Since:
- 2.0.0
- Author:
- Egg-03
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
UserService
public UserService()
-
-
Method Details
-
getUser
Retrieves the current system user information.- Returns:
- a non-null
User
object containing the username, user home directory, and current working directory.
-