File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
utils/common/src/main/kotlin Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ import kotlin.io.path.moveTo
2929
3030import org.apache.logging.log4j.kotlin.logger
3131
32+ typealias FileStash = DirectoryStash
33+
3234/* *
3335 * A [Closeable] class which temporarily moves away directories / [files] and moves them back on close. Any conflicting
3436 * directory / file created at the location of an original directory / file is deleted before the original state is
@@ -82,3 +84,8 @@ class DirectoryStash(files: Set<File>) : Closeable {
8284 * A convenience function that stashes directories / files using a [DirectoryStash] instance.
8385 */
8486fun stashDirectories (vararg files : File ): Closeable = DirectoryStash (setOf (* files))
87+
88+ /* *
89+ * A convenience function that stashes directories / files using a [DirectoryStash] instance.
90+ */
91+ fun stashFiles (vararg files : File ): Closeable = FileStash (setOf (* files))
You can’t perform that action at this time.
0 commit comments