Skip to content

sshark/file-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-utils

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.

Setup

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: -

  1. cats-effect
  2. log4cats
  3. console4cats
  4. decline

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.

Notes

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages