Class User
java.lang.Object
io.github.eggy03.ferrumx.windows.entity.user.User
Immutable representation of a user on a system. The service which retrieves this info is platform-agnostic.
Fields capture basic user information such as username, home directory, and user directory.
Usage examples
// Build a new User
User user = User.builder()
.userName("john_doe")
.userHome("C:\\Users\\john_doe")
.userDirectory("C:\\Users\\john_doe\\Documents")
.build();
// Create a modified copy using the builder
User updatedUser = user.toBuilder()
.userName("jane_doe")
.build();
- Since:
- 2.0.0
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
userName
Current username of the user behind this instance -
userHome
Fetches the user's home directory. For more information on what the home directory could mean, check out the definitions provided by your OS. -
userDirectory
Current working directory of the user. This usually points to the directory where this library code exists.
-
-
Constructor Details
-
User
public User()
-
-
Method Details
-
toString
-