gpt4 book ai didi

configuration - 在 Clojure 中检测操作系统

转载 作者:行者123 更新时间:2023-12-03 21:26:51 24 4
gpt4 key购买 nike

是否有等效于 Common Lisp 的 *features * 在 Clojure 中,您可以检测操作系统和其他环境配置吗?还是我只是通过 Java API 来完成?

最佳答案

可能使用Java API。这很容易,没有意义重新发明轮子。

user> (System/getProperty "os.name")
"Linux"
user> (System/getProperty "os.version")
"2.6.36-ARCH"
user> (System/getProperty "os.arch")
"amd64"

关于configuration - 在 Clojure 中检测操作系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4785937/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com