file-utils is a project to demonstrate how to a native application using functional Scala code, adhering to Tagless Final pattern, using GraavlVM native-image. Side effects are contained and pushed to the fringe of the application where they will be executed at the end of the world.
The purpose of this application is to calculate the disk space occupied by the files for the given top directory.
Run sbt followed by the command nativeImage to build the native application for the current OS. However,
the command might not work out of the box because the build environment is not setup for GraalVM
native-image. Please refer to the GraalVM documents for more details.
This application is written using these functional style libraries: -
nativeImage will generate an executable file and place it at target\native-image\file-utils.exe.
Modify name in build.sbt to change the filename if necessary.
Though META-INF\native-image\reflect-config.json is provided, sometimes it is necessary to have a
new set of native-image configuration files. Add -agentlib:native-image-agent=config-output-dir=META-INF\native-image\
to the java command line to generate a new set of configuration files.