Thomas Mangin
0bd094292f
v: add support for _qnx.c.v
overriding _default.c.v
( #17611 )
2023-03-12 19:48:36 +02:00
Ikko Eltociear Ashimine
784592af83
os: fix typo in os.v ( #17519 )
2023-03-07 08:30:37 +01:00
MatejMagat305
954843c486
os: fix default result of os.temp_dir() for termux ( #17237 )
2023-02-07 00:07:35 +02:00
Thomas Peißl
3aeb6179b7
os: rework mv so it works with different partitions (add fallback to os.mv_by_cp + tests) ( #17065 )
2023-01-22 19:02:04 +02:00
yuyi
b171102b03
os: minor optimization in os.v ( #16791 )
2022-12-28 10:28:47 +02:00
yuyi
68883fc4d9
os: fix os.file_ext('/tmp/.gitignore')
previously returning '.gitignore' => it now returns '' ( #16771 )
2022-12-26 12:53:38 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' ( #16428 )
2022-11-15 16:53:13 +03:00
Delyan Angelov
f427a5241a
os,tools: add os.vtmp_dir()
...
Use it to consistently place all temporary files created by tests in a overridable folder specific to the user, that is easy to cleanup later.
NOTE: os.temp_dir() on macos returns `/tmp`, and using `/tmp/v` is a problem when multiple unix users are trying to access/create/write to it.
2022-11-03 10:19:51 +02:00
Alexander Medvednikov
c6158e4519
all: remove unnecessary IError() casts
2022-10-28 19:08:30 +03:00
Delyan Angelov
2083e6b04c
os: cleanup APIs returning !bool
to either return !
or bool
( #16111 )
2022-10-20 13:56:06 +03:00
Delyan Angelov
78e9362d74
ci: workaround for a VLS failing test, that stops symbol registration after the first fn()! {
2022-10-16 13:38:20 +03:00
yuyi
f6844e9766
all: change optional to result of io ( #16075 )
2022-10-16 09:28:57 +03:00
Delyan Angelov
a689641c1b
os: rewrite os.walk and os.walk_with_context to use iteration, instead of recursion
2022-08-22 17:27:14 +03:00
Delyan Angelov
21917f5b00
os: small cleanup of needless r'\' usage
2022-08-22 16:32:42 +03:00
Delyan Angelov
02d675ab67
os: restore the env TERMUX_VERSION based final resort for runtime auto detection of Termux
2022-07-08 11:16:53 +03:00
Larpon
9f3b6e3e3a
android: provide more predictable logging, add comptime termux support ( #14984 )
2022-07-07 18:28:29 +03:00
Delyan Angelov
69d292e8d1
os: detect termux more reliably
2022-07-01 13:52:57 +03:00
Delyan Angelov
b6b611aa82
v: support better separation of general Android vs Termux specific code (part 2)
2022-07-01 13:18:31 +03:00
Delyan Angelov
30401e003f
v: support better separation of general Android vs Termux specific code (part 1)
2022-07-01 12:48:35 +03:00
Markus F.X.J. Oberhumer
74bb5ae17a
os: add an optional "mode" parameter to os.mkdir and os.mkdir_all ( #14887 )
2022-06-30 13:49:47 +03:00
Wertzui123
587101a1ea
os: fix find_abs_path_of_executable
function (on Windows) ( #14835 )
2022-06-23 03:36:15 +03:00
Ben
e201665e92
os: fix file_ext function ( #14566 )
2022-06-02 07:09:46 +03:00
Adam Oates
a786c58d0a
os: add fn user_names()
( #14424 )
2022-05-18 13:37:34 +03:00
Ben
cbb24d34c9
os: fix is_abs_path function for Windows systems ( #14397 )
2022-05-16 09:59:37 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! ( #14366 )
2022-05-13 06:56:21 +03:00
Larpon
0ec1c8d9f0
szip: expose zip_folder ( #14356 )
2022-05-11 16:48:41 +03:00
Larpon
506259adb6
os: add behavior info to is_dir_empty
documentation ( #14110 )
2022-04-21 18:21:00 +03:00
Hunam
0374f021c5
os: small cleanup of function description ( #14112 )
2022-04-20 20:58:41 +03:00
Larpon
a1342e85c3
os: add info about overwritten content to write_file
( #14109 )
2022-04-20 15:29:58 +03:00
pancake
af79c1e6ef
os: implement os.config_dir() like in Go's UserConfigDir ( #13893 )
2022-04-01 22:04:43 +03:00
JalonSolov
de2fc87995
os: handle trailing backslash on windows path when quoting ( #13705 )
2022-03-10 01:29:37 +03:00
Alexander Medvednikov
36ec47cd20
all: replace "NB:" with "Note:" (docs/comments)
2022-03-06 20:01:22 +03:00
Delyan Angelov
bad30bdd79
os: allow using XDG_CACHE_HOME for choosing the folder returned by os.cache_dir()
on windows too
2022-02-13 11:18:51 +02:00
Tim Basel
9d0a5942ac
builtin: change IError msg
and code
to methods + fix vlib, add a deprecation notice for the old usages ( #13041 )
2022-02-11 15:52:33 +02:00
Merlin Diavova
f3683b7cdc
os: add an .exit_code field to os.Command ( #13321 )
...
* Added os.Command.exit_code
* vfmt vlib/os/os_test.v
* extract os.Command to os.v, add a dummy panicing implementation on windows, just for parity, fix os_test.v on macos, skip test_command on windows.
Co-authored-by: Merlin Diavova <md@merlindiaova.org>
Co-authored-by: Delyan Angelov <delian66@gmail.com>
2022-01-30 00:44:52 +02:00
Delyan Angelov
fa6f7d4c83
os: add os.quoted_path/1, use it consistently for running V itself
2022-01-22 21:13:28 +02:00
Alexander Medvednikov
59ed4be49a
all: update copyright year
2022-01-04 12:21:12 +03:00
Delyan Angelov
5e8288528a
ci: fix v -b js vlib/builtin/js/array_test.js.v
2021-11-22 15:11:33 +02:00
Delyan Angelov
7a0dc60d04
os: re-add the leak in os.join_path (the os.join_path(x, ...arr)
case should be handled by V). Add a memleak free os.join_path_single version.
2021-11-22 14:40:55 +02:00
Delyan Angelov
c7bd74e0f8
ci: fix build, remove [manualfree]
from os.vmodules_paths for now
2021-11-21 22:34:38 +02:00
Delyan Angelov
1aaac13a60
cgen: make os
less special, fix an -autofree leak on just import os
...
* Improve documentation of v.util.Surrounder
* Remove `os` from the list of "no auto free" `builtin` mods
* Fix -autofree freeing of `const x = []string{}`.
* Add a valgrind regression test.
* Implement os.getenv_opt in vlib/os/environment.js.v too.
2021-11-21 21:50:10 +02:00
Delyan Angelov
24ffc1ffb2
os: fix os.rmdir_all for folders with recursive symlinks
2021-11-20 10:28:12 +02:00
Delyan Angelov
b86c79329b
os, builtin: reduce leaks without -autofree
2021-10-29 15:49:30 +03:00
Delyan Angelov
e99b699ac6
os: make os.mkdir_all more robust (honor / on windows too), add a test for it
2021-10-24 19:16:46 +03:00
Delyan Angelov
f34daf9ff4
os: add os.walk_with_context/3 and a test for it
2021-10-24 19:12:14 +03:00
Delyan Angelov
e34046a0e1
os: remove pub
from impl_walk_ext
2021-10-24 18:48:54 +03:00
Delyan Angelov
d1c4b470bc
os: make os.ls('') return an error, make os.walk_ext more memory efficient on deep hierarchies, add tests for os.walk_ext
2021-10-24 18:44:13 +03:00
Delyan Angelov
7bd145d88a
os,net: cleanup deprecated @VROOT usages
2021-09-19 16:24:24 +03:00
Delyan Angelov
eec930b86a
os: turn some panics into return error()
2021-09-18 10:45:04 +03:00
Enzo
e3b65092d6
parser: deprecate size_t
( #11443 )
2021-09-08 13:09:32 +03:00