clojure how to know the path of a folder / file / directory in one project?

后端 未结 3 1770
名媛妹妹
名媛妹妹 2021-02-13 11:53

Assume there is two files inside my clojure project, one clj and the other is txt. Is there a way to know the path (as a string) of the txt file from the clj file?

Ther

3条回答
  •  面向向阳花
    2021-02-13 12:23

    The Clojure library local-file allows you to get your current project's directory with local-file/project-dir. As long as you know where in your project the file you want to access is, you should be able to find it this way.

提交回复
热议问题