握猫猫
39fbd30513
Fix OSError errorCode field is not assigned a value ( #22954 )
...
In this PR, the following changes were made:
1. Replaced `raise newException(OSError, osErrorMsg(errno))` in batches
with `raiseOSError(errcode)`.
2. Replaced `newException(OSError, osErrorMsg(errno))` in batches with
`newOSError(errcode)`.
There are still some places that have not been replaced. After checking,
they are not system errors in the traditional sense.
```nim
proc dlclose(lib: LibHandle) =
raise newException(OSError, "dlclose not implemented on Nintendo Switch!")
```
```nim
if not fileExists(result) and not dirExists(result):
# consider using: `raiseOSError(osLastError(), result)`
raise newException(OSError, "file '" & result & "' does not exist")
```
```nim
proc paramStr*(i: int): string =
raise newException(OSError, "paramStr is not implemented on Genode")
```
2023-11-17 22:06:46 +01:00
ringabout
4d11d0619d
complete std prefixes for stdlib ( #22887 )
...
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
2023-10-30 17:03:04 +01:00
CMD
49df69334e
Fix IndexDefect in asyncfile.readLine ( #22774 )
...
`readLine` proc in asyncfile module caused IndexDefect when it reached
EoF. Now it returns empty string instead.
2023-10-01 07:20:43 +02:00
tersec
612abda4f4
remove decades-deprecated Win32 API *A function support ( #21315 )
2023-03-02 05:51:54 +01:00
ringabout
75ece74bdd
fixes #20526 ; use nimPreviewSlimSystem for documentation build ( #20714 )
...
* fixes #20526 ; use `nimPreviewSlimSystem` for `koch docs`
* fixes documentation errors
* fixes remaning issues
2022-11-01 12:53:14 +01:00
Andrey Makarov
19ff746916
Markdown code blocks migration part 7 ( #20547 )
2022-10-12 16:13:43 +02:00
metagn
0b1650576c
move widestrs out of system ( #20462 )
...
* move widestrs out of system
* fix osproc
2022-10-01 22:35:09 +02:00
ringabout
3d2f0e2c7c
make more standard libraries work with nimPreviewSlimSystem ( #20343 )
...
* make more standard libraries work with `nimPreviewSlimSystem`
* typo
* part two
* Delete specutils.nim
* fixes more tests
* more fixes
* fixes tests
* fixes three more tests
* add formatfloat import
* fix
* last
2022-09-27 20:06:23 +02:00
konsumlamm
f02de25ca1
Fix #15150 ( #18730 )
2021-08-31 08:14:05 +02:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
flywind
47c078e29c
use single backtick ( #17166 )
2021-02-23 21:05:39 -08:00
flywind
eee3b189ff
fix #15148 ( #15149 )
...
* fix #15148
Co-authored-by: alaviss <leorize+oss@disroot.org >
2020-08-08 07:24:54 +02:00
Andreas Rumpf
7626907401
ARC works for async on Windows ( #13179 )
2020-01-17 11:14:17 +01:00
narimiran
aa513d78e7
[backport] run nimpretty on async
2019-09-30 13:57:58 +02:00
Araq
bc7733827d
make more parts of the stdlib compile with --styleCheck:error
2019-07-10 15:48:30 +02:00
Jimmie Houchin
657062145b
Added FileMode to comment on asyncfile openAsync ( #8008 )
2018-06-11 00:53:42 -04:00
andri lim
19164929ed
fixes #7347 , asyncfile.getFileSize ( #7354 )
...
* fixes #7347
* fixes #7347
2018-03-17 15:21:22 +00:00
Ruslan Mustakov
319e88585a
Fix AsyncFile open flags. Fixes #5531
2018-02-17 17:40:35 +07:00
Dominik Picheta
86fb8bf723
Revert 3db460f504 as requested by @Araq.
2018-01-28 17:13:08 +00:00
Dominik Picheta
a1e2ec8872
Fix typo in asyncfile.
2017-11-24 17:51:34 +00:00
Dominik Picheta
3db460f504
The AsyncFD type now implies that the underlying FD is registered.
...
* `asyncdispatch.register` won't attempt to register an
``AsyncFD``, but instead assume that it is already registered.
2017-11-24 16:17:48 +00:00
Yuriy Glukhov
bbbf5cf800
Added newAsyncFile proc ( #6129 )
2017-07-21 17:20:21 +02:00
Andreas Rumpf
3afd852f54
Fixes #5532 win async write ( #5791 )
...
* nimgrab tool bugfix: don't divide by zero
* fixes #5532 (asyncfile write on Windows)
* add a comment about what has been tried instead
2017-05-14 17:10:39 +02:00
Jacek Sieka
ce86b4ad78
Posix from detect ( #5697 )
...
* refactor posix.nim
* types move to separate files for platform-specifc and generic
("other')
* consts move to separate files that get autogenerated by detect.nim
* proc's stay where they are for now, though in a second stage might
move as well
* fix missing when
2017-04-12 23:10:54 +02:00
Emery Hemingway
bc5c2d8414
getFileSize and setFileSize procedures for File and AsyncFile
...
Platform independent procedure to set a file length. Useful when
replacing file content.
2017-04-05 19:05:43 -05:00
Dominik Picheta
0cad2896ae
Implement asyncfile.readToStream.
2017-03-23 21:34:53 +01:00
Dominik Picheta
f9cce32097
Various fixes to FutureStreams based on PR feedback.
2017-02-26 12:52:19 +01:00
Araq
45765601e0
fixed premature finishing of httpclient.downloadFile
2017-02-25 17:26:03 +01:00
Dominik Picheta
f9f86899b5
Implement streamed async/sync downloadFile and deprecate old one.
2017-02-11 14:00:53 +01:00
Dmitry Polienko
e695d3bfba
Fix asyncfile in Windows Server 2003
...
Fixes #5022
2016-11-14 02:55:57 -08:00
Dominik Picheta
87eb3a105d
Some small fixes to changes introduced by #4683 .
2016-09-06 20:35:02 +02:00
Anatoly Galiulin
e4c46e6fba
Add async IO operations with buffers on files and sockets
2016-09-06 09:31:13 +07:00
cheatfate
fb4ff86ad6
Make some proper closes.
2016-06-09 07:07:43 +03:00
cheatfate
be5639582e
Correct proper usage of getOverlappedResult()
2016-04-13 13:19:50 +03:00
Adam Strzelecki
43bddf62dd
lib: Trim .nim files trailing whitespace
...
via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
2015-09-04 23:03:56 +02:00
pdw
192ba3bbc0
lib/pure/a-c - Dropped 'T' from types
2015-06-04 13:17:11 +02:00
def
5020806696
Fix doc for asyncfile
2015-03-11 12:31:24 +01:00
Dominik Picheta
d8c5c2f222
Export AsyncFile. Add asyncfile module to docgen.
2015-03-06 10:51:56 +00:00
def
e686ca2523
Fix a few more warnings
2015-02-17 02:22:30 +01:00
Guillaume Gelin
3119fe087d
Happy new year!
2015-01-06 15:26:33 +01:00
Dominik Picheta
baae9bfea8
s/sock/fd/. Fixes #1487 .
2014-09-27 17:15:32 +01:00
Dominik Picheta
952de51170
Removed async console FDs.
2014-09-08 16:48:09 +01:00
Dominik Picheta
cb8a25b3d1
Added asyncfile.readLine and async stdin/out/err. Ref #1487 .
2014-09-06 19:50:11 +01:00
Dominik Picheta
52c16a1a79
Implemented asyncfile for Posix.
2014-09-05 21:14:18 +01:00
Dominik Picheta
31deee5142
Add asyncfile module.
2014-09-05 17:39:14 +01:00