669eb3fd28
tree: add clang-format off labels
...
When I figure out how to make clang-format ignore struct array
initialisers, I'll get rid of this.
2024-03-12 12:19:23 +13:00
e63e7a77a2
tree: specify the lua/ directory for includes
2024-03-11 12:37:50 +13:00
bbf9b88c66
tree: clean up whitespace and includes
2024-03-11 12:28:50 +13:00
7c7f7e588a
fs: fix build on musl libc
...
Remove leftover fts.h include from back when this file used
it. dirent.h is used as a replacement and, as part of the POSIX
standard, it should be used instead of the nonstandard fts.h.
2024-02-29 17:22:17 +13:00
8c5777fb98
tree: add standard copyright phrasing
...
Callisto - standalone scripting platform for Lua 5.4
Copyright (c) 2023-2024 Jeremy Baxter.
2024-02-19 10:16:45 +13:00
b5d61a25cb
rename the statically linked strlcpy to strbcpy
...
stands for "string bounds copy". Some systems like macOS include their
very own version of strlcpy and testing for that would require some
bloat like gnu automake so I'm just gonna rename it to prevent any
future conflicts. I only test on Linux and OpenBSD anyway. ;)
2024-01-25 19:47:57 +13:00
7b8c7632e9
fix up fs
2023-12-26 17:47:07 +13:00
058aa579ba
implement fs.remove, a recursive deletion function
2023-12-24 18:06:58 +13:00
2feddd9abc
improve fs docs and minor blunders
2023-12-24 15:05:52 +13:00
11f6a34ebf
merge fs and path libraries
2023-12-24 14:24:55 +13:00
2a75eab074
split the contents of fs.isfile and fs.isdirectory into its own function
...
and add more docs
2023-12-24 06:36:06 +13:00
fdcb8f794a
remove errors.h
2023-12-24 06:34:51 +13:00
790ad50f2b
implement fs.isfile and fs.isdirectory
2023-12-23 20:52:34 +13:00
aa7ae1d9ac
implement fs.copy, a file copying routine and clean up some docs in fs
2023-12-23 20:33:24 +13:00
cae9985747
change BSD ifndefs to __OpenBSD__ and remove unnecessary ifdefs
...
I'm not sure if any operating system other than OpenBSD
has strlcpy/strlcat. May need to use a configure script
for this later on.
2023-12-23 16:33:38 +13:00
290289cbf5
Refactor and fix up a lot of code
...
Don't tell the boss I forgot a couple of free()s...
2023-11-26 17:13:41 +13:00
7ff02fbbb1
Move fs.basename and fs.dirname into the path library, create errors.h
2023-08-10 08:14:05 +12:00
6590351e48
Add fs.mkdir and fs.rmdir functions, improve lfs.c
...
- Add fs.mkdir
- Add fs.rmdir
- Change library description
- Re-order #includes
- Use #defines for error messages
2023-08-01 13:35:02 +12:00
84f58824b9
Rename the file module to fs, and make some documentation changes
2023-07-31 07:33:23 +12:00