Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

1 тиждень тому
123456789101112131415161718192021222324252627282930313233
  1. Title: The first Local Host Access working version
  2. Date: 2024-12-09 00:00
  3. Category: News
  4. Slug: lha-jvm-macos
  5. Lang: en
  6. ![web-test][web-test]
  7. # Local Host Access
  8. Tiny web server called Local Host Access (**LHA**) is ready to replace
  9. Local File System Access (**LFSA**) on JVM and macOS: I've generated this
  10. very article with LHA on macOS. Thus, Kotlin prooved to be a good choice for
  11. cross-platform development with a minor limitation.
  12. The minor limitation is the fact that 99% of Kotlin is used on JVM. The
  13. remaining 1% is so-called Kotlin Native for iOS, Linux, macOS, and Windows.
  14. Thus, when one needs something as simple as to find out if a symlink
  15. points to a file or directory, that's a dead end, there's no article for
  16. that on the Internet. For C, there are numerous articles telling to call `stat()`
  17. function. For Kotlin Native, it's unclear how to properly make such a simple call.
  18. I've actually asked [this specific question][question] in November,
  19. and still wait for an answer.
  20. In the meantime, I had to resort to calling `stat` in the shell (aka `system()`).
  21. # December
  22. I plan to implement the first Kotlin -> Python translator to let LHA
  23. cover as many platforms as the original LFSA in Python.
  24. [web-test]: ../../images/2024_web-test.jpg
  25. [question]: https://discuss.kotlinlang.org/t/how-to-call-stat-c-function-to-get-file-type/29541