1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

29 Commits

Author SHA1 Message Date
ef5be22f81 all: replace generic <> with [] - part 2 (#16536) 2022-11-26 18:23:26 +02:00
9bb1867be0 os: refactor err == IError(os.Eof{}) to err is os.Eof 2022-11-16 00:53:45 +02:00
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
f6844e9766 all: change optional to result of io (#16075) 2022-10-16 09:28:57 +03:00
c3548c9413 tests: omit testsuite_begin/end() optional (#15871) 2022-09-25 10:29:25 +03:00
d624ad50a7 os: fix file.read() (#15861) 2022-09-24 08:58:55 +03:00
41dbd12bc4 tests: make error handling the same as the main function (#15825) 2022-09-21 19:45:43 +03:00
8f98f1db9e os: fix os.open_file('text.txt', 'wb', 0o666), add test (#15420) 2022-08-14 09:50:05 +03:00
b01f71d9da io: migrate the Reader API to Result instead of Option (#15229) 2022-08-08 02:33:25 +03:00
ed56c3957e os: add File.reopen and File.eof methods (#15184) 2022-07-28 16:21:23 +03:00
d679146a80 fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
fbb9e65c0f all: ~500 more byte=>u8 2022-04-15 18:25:45 +03:00
fb192d949b all: replace []byte with []u8 2022-04-15 15:35:35 +03:00
d4a0d6f73c all: byte => u8 2022-04-15 14:58:56 +03:00
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
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
f731060caf all: update chmod/chdir usages 2021-08-28 10:23:01 +03:00
44828cbb29 ci: fix -cstrict job 2021-07-22 18:47:23 +03:00
b537c9f624 tests: add a separate File.tell() test 2021-07-22 16:25:23 +03:00
9171c1131e ci: skip a failing f.tell() test on macos only 2021-07-22 13:28:00 +03:00
d7dcb47db3 os: implement File.seek/2 and File.tell/0 2021-07-22 08:00:21 +03:00
c4b5805890 checker: check generic method call args mismatch (#10669) 2021-07-05 10:14:00 +03:00
04ea2824d3 os: implement File.read_bytes_into_newline method for reading into a buffer, line by line (#10129) 2021-05-21 13:18:08 +03:00
49deeac71e os: fix file read end-of-file detection (#10070) 2021-05-13 09:48:55 +03:00
fec89c7efb ci: fix some of v test-cleancode 1 2021-04-05 20:47:32 +03:00
99abd46ac9 os: add (read|write)_raw[_at] to File (#9171) 2021-03-10 18:45:12 +02:00
fdcfe397d4 fmt: write empty or blocks the same as empty fn bodies, empty structs, etc (#9136) 2021-03-06 21:04:51 +02:00
ce92bf8da0 os.File: add .read_struct_at and .write_struct_at (#9114) 2021-03-06 20:44:53 +02:00
5e0e44eb69 os: move file methods to vlib/os/file.c.v, document them, add new file.read_struct and file.write_struct and tests 2021-03-04 14:54:39 +02:00