Commit graph

451 commits

Author SHA1 Message Date
Yashank
5b7cc63279
docs: fix comment considered as a token (#21705) 2024-06-20 12:25:20 +03:00
Turiiya
a2ce55d922
builtin: update last_index_u8, deprecate index_u8_last string methods, make consistent with last_index (#21604) 2024-06-04 13:21:47 +03:00
Delyan Angelov
c23c543b67
os: simplify and unify os.join_path and os.join_path_single, and add more tests (#21494) 2024-05-13 17:33:10 +03:00
Henrik Holst
76142b18a9
os: fix join-path (#21425) 2024-05-13 10:37:55 +03:00
Delyan Angelov
32f7ec8cea
os: add os.write_lines/2 + tests, fix deprecation notice in read_bytes_into_newline in file_test.v (#21343) 2024-04-25 08:31:01 +03:00
Turiiya
8aa9314a99
vlib: refactor empty string checks to use s == '' or s != '', instead of s.len == 0 (#21300) 2024-04-18 02:44:31 +03:00
Turiiya
1a35a783f1
breaking,checker: disallow initializing private struct fields outside structs module (#21183) 2024-04-12 13:53:02 +03:00
Turiiya
ef3a224ea1
os: clarify some doc comments (#21209) 2024-04-07 09:30:12 +03:00
Alexander Medvednikov
acf0107493 builtin: str.last_index(); pref: hide-auto-str; 2024-03-28 18:26:30 +03:00
Turiiya
f77bb32044
all: fix typos (#21089) 2024-03-25 12:18:27 +02:00
rustrover
c90af5ffe3
os: remove repetitive words in comments (#20981) 2024-03-09 15:22:05 +02:00
syrmel
410bd9db71
os: refactor to use os.stat and os.lstat instead of unsafe C calls (#20759) 2024-02-08 19:27:49 +02:00
syrmel
205f2ddd30
os: add os.stat() and helpers (#20739) 2024-02-07 07:12:03 +02:00
ScriptMaster
ea2d92d661
os: document os.ls (using readdir), add example (#20622) 2024-01-21 20:45:19 +02:00
Delyan Angelov
b120c10f42
os: make os.cache_dir() and os.vtmp_dir() more robust to parallel test executions on windows (#20495) 2024-01-12 16:09:08 +02:00
Anton
763f94388b
all: update copyright year (#20334) 2024-01-01 23:29:54 +02:00
Turiiya
e5e26db5c4
os: update mv fns, improve performance, add params struct to control overwrite behavior (#20156) 2023-12-13 09:43:18 +02:00
Turiiya
acde573deb
os: fix mv_by_cp for directories (#20154) 2023-12-11 20:44:33 +02:00
Delyan Angelov
4b3109237d
builtin: deprecate string.last_index/1 for string.index_last/1, and string.last_index_u8/1 for string.index_u8_last/1 (#20095) 2023-12-05 13:56:59 +02:00
gym603
afaeb74238
os: create the folder described by XDG_CACHE_HOME, *if it is non empty, and it does not exist yet*, when calling os.cache_dir() (#20046) 2023-11-30 23:04:42 +02:00
Turiiya
4e439442ab
os: ignore empty path segments in join_path (#19877) 2023-11-15 10:54:20 +02:00
Joe C
757929392e
all: update attributes to use new syntax 2023-11-15 16:16:01 +11:00
Turiiya
b7400fc058
os: add fast path to mkdir_all, when the given folder already exists (#19869) 2023-11-14 23:41:39 +02:00
Turiiya
fbefe6858b
os: mention that execute_opt error contains commands output (#19742) 2023-11-03 13:28:42 +02:00
Turiiya
c82c760df7
os: add a new function execute_opt (#19723) 2023-11-01 13:17:33 +02:00
Turiiya
9051ac8921
all: fix typos (#19634) 2023-10-23 21:21:15 +03:00
Slashscreen
33754f43fa
all: support -os plan9, $if plan9 {, and _plan9.c.v (stage 1 for plan9) (#19389) 2023-09-20 07:27:30 +03:00
Delyan Angelov
7ffa8c13bf
vlib: remove functions and fields, deprecated before 2023-03-20
* remove []int.reduce in favour of arrays.fold
  * remove datatypes.Set.equal in favour of datatypes.Set.==
  * remove datatypes.Set.difference in favour of datatypes.Set.-
  * remove gg.Context.set_cfg in favour of gg.Context.set_text_cfg
  * remove gg.Context.timage_pip in favour of gg.Context.pipeline.alpha
  * remove os.is_writable_folder in favour of os.ensure_folder_is_writable

  Discovered with `v run cmd/tools/show_ancient_deprecations.v 180`
2023-09-16 17:16:54 +03:00
Alexander Medvednikov
b9a233b1a0 checker: more line-info logic 2023-09-11 01:38:09 +03:00
yuyi
18e60e77de
fmt: remove inline comments (#19263) 2023-09-03 23:51:56 +03:00
Turiiya
f755118e7c
vlib: update doc comments (#19231) 2023-08-30 08:50:00 +03:00
Turiiya
981ff192e4
os: update doc comment for input_opt return (#19223) 2023-08-27 13:40:21 +03:00
Alexander Medvednikov
6756d28595 all: 2023 copyright 2023-03-28 22:55:57 +02:00
Delyan Angelov
daa9034583
os: return the long path for os.temp_dir() on windows, even for folders like c:\someth~1 (#17623) 2023-03-14 00:51:52 +02:00
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