17 Commits

Author SHA1 Message Date
Eugene Kabanov
d4634c5405
Add updateFilePos() primitive and tests. (#229) 2024-09-04 03:12:02 +00:00
Eugene Kabanov
4d4dfb7b32
Add cross-platform fsync() primitive and improve Direct mode. (#228) 2024-09-03 21:15:41 +00:00
Eugene Kabanov
af07b0a70d
Fix OpenFlags.Append mode for io2.openFile() (#226)
* Initial commit.

* Fix Windows version.

* Remove debugging echoes.

* Fix Posix version.

* Add one more test.
2024-08-02 05:32:31 +00:00
Eugene Kabanov
8e0e344f0f
Add truncate()/ftruncate() cross-platform implementation. (#225) 2024-07-28 23:03:43 +00:00
tersec
e00fea1f6e
fix deprecation warnings from results; deprecate shims/io module; rm deprecated shims/os module (#223) 2024-06-27 11:48:32 +00:00
Eugene Kabanov
bb086e69da
Fix Windows ACL flakiness issue (Windows error 1336). (#221)
* Add getHomePath(), getConfigPath() and getCachePath() implementations.
Fix ACL flakiness issue.
Add tests.

* Add getTempPath().
Normalize path endings for all xxPath() functions.

* Fix 2.0/devel compilation errors.
2024-06-17 07:04:14 +00:00
tersec
326ef09a46
remove dead code under Nim 1.6+ (#206) 2023-07-31 21:07:48 +00:00
Jacek Sieka
02f0929fc4
avoid zeroMem (#207)
on cached data, it doubles read time (!)
2023-07-21 08:01:07 +02:00
Eugene Kabanov
407a598836
Fix Windows MAX_PATH limitation for absolute paths in io2 module. (#169)
* Fix Windows MAX_PATH limitation for absolute paths.

* Update algorithm to be more compatible with both directory and file paths.

* Add test.
2023-02-02 09:30:40 +01:00
Bung
f2f9685ec9
fix int set (#163) 2022-12-19 12:28:22 +01:00
Eugene Kabanov
0476bcad1b
Cross-platform lockFile()/unlockFile() procedures for io2. (#116) 2022-08-05 19:58:34 +03:00
Miran
d37e77a72b
make it more Nim 1.4+ compatible (#131)
* make it more 1.6-compatible

* these changes are from 1.4 forward
2022-07-26 17:52:59 +00:00
Jacek Sieka
74d21ec8f4
mark io2 EH-free (#72) 2021-01-26 14:10:47 +01:00
Eugene Kabanov
ff524ed832
Fix getCurrentDir() gcc compilation warning. (#61)
* Fix GCC warning on getcwd usage.
* Check returned value of getCurrentDir() in tests.
2020-11-04 15:22:38 +02:00
Eugene Kabanov
7018fb0b5e
Procedures to set user-only Windows ACL settings for files and folders. (#58)
* Initial commit of UserOnly Windows ACL settings for files and folders.

* Move ACL procedures to windows/acl.
Move ACL tests to test_winacl.nim.

* Add test_winacl.nim

* Fix *nix compilation problem.

* More proper fix for *nix targets.
2020-10-15 14:27:58 +02:00
cheatfate
3e4dc8213b
Fix some Windows API declarations. 2020-09-29 13:34:40 +03:00
Eugene Kabanov
7a2b6dbdda
IO2 (#53)
* Initial commit of io2 module

* Rename to io2.
Add createPath with permissions.
Add writeFile with permissions.
Add tests.

* Add test_io2 to all tests.

* Add posix permissions.

* Add toString procedure for set[Permission] and tests.

* Remove safeio.nim

* Add setPermissions procedures.
Fix writeFile() to change permissions.
Add more writeFile() tests.

* Change C ReadOnly/WriteOnly/ReadWrite to pair of Read/Write.
Add tests for openFile.

* File handles is no inherited by default, with option to turn on inheritance.

* Review comments fixes.
More tests.

* Fix x86 compilation problems.

* Rename toSet -> toPermissions.

* Avoid race condition on writeFile permissions.
2020-09-22 08:53:00 +03:00