public class ProfilesConfigFileWriter extends Object
Constructor and Description |
---|
ProfilesConfigFileWriter() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteProfiles(File destination,
String... profileNames)
Remove one or more profiles from the existing credentials file by
in-place modification.
|
static void |
dumpToFile(File destination,
boolean overwrite,
Profile... profiles)
Write all the credential profiles to a file.
|
static void |
modifyOneProfile(File destination,
String profileName,
Profile newProfile)
Modify one profile in the existing credentials file by in-place
modification.
|
static void |
modifyOrInsertProfiles(File destination,
Profile... profiles)
Modify or insert new profiles into an existing credentials file by
in-place modification.
|
public static void dumpToFile(File destination, boolean overwrite, Profile... profiles)
ProfilesConfigFileWriter.modifyOrInsertProfiles(File, Profile...)
instead, if you want to perform in-place modification on your existing
credentials file.destination
- The destination file where the credentials will be written to.overwrite
- If true, this method If false, this method will throw
exception if the file already exists.profiles
- All the credential profiles to be written.public static void modifyOrInsertProfiles(File destination, Profile... profiles)
destination
- The destination file to modifyprofiles
- All the credential profiles to be written.public static void modifyOneProfile(File destination, String profileName, Profile newProfile)
destination
- The destination file to modifyprofileName
- The name of the existing profile to be modifiednewProfile
- The new Profile object.Copyright © 2024. All rights reserved.