Skip to content

Commit 3ea0dd8

Browse files
author
Francisco Solis
committed
Fixes
1 parent e655ab7 commit 3ea0dd8

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ publishing {
107107

108108
pom.withXml {
109109
asNode().appendNode('packaging', 'jar')
110-
if(asNode().remove(asNode().get('dependencies')[0]) != null) {
110+
if(asNode().get('dependencies')[0] != null) {
111111
asNode().remove(asNode().get('dependencies')[0])
112112
}
113113
}

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
rootProject.name = 'FileModule'
1+
rootProject.name = 'FilesModule'
22

src/main/kotlin/xyz/theprogramsrc/filesmodule/config/YmlConfig.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,11 +349,18 @@ class YmlConfig(val file: File){
349349
/**
350350
* Gets the entry set of the [YmlConfig]
351351
*
352-
* @param path The path to get the value of
353352
* @param deep If true, the keys will contain all the keys within any child node (and their children, recursively). Otherwise, this will contain only the keys of any direct children, and not their own children.
354353
* @return The entry set of the [YmlConfig]
355354
*/
356-
fun entries(path: String, deep: Boolean = false): Map<String, Any> = config.getKeys(false).associateWith { get(it) }
355+
fun entries(deep: Boolean = false): Set<Map.Entry<String, Any>> = config.getKeys(deep).associateWith { get(it) }.entries
356+
357+
/**
358+
* Gets the keys of the [YmlConfig]
359+
*
360+
* @param deep If true, the keys will contain all the keys within any child node (and their children, recursively). Otherwise, this will contain only the keys of any direct children, and not their own children.
361+
* @return The keys of the [YmlConfig]
362+
*/
363+
fun keys(deep: Boolean = false): Set<String> = config.getKeys(deep)
357364

358365
/**
359366
* Gets a configuration section of the given path

0 commit comments

Comments
 (0)