0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

13 commits

Author SHA1 Message Date
Bartek Iwańczuk
2c6b93e0a0 fix: edge case in toAsyncIterator (#2335) 2019-05-11 10:05:56 -04:00
Ryan Dahl
9dfebbc949
Fix eslint warnings (#2151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
2019-04-21 16:40:10 -04:00
Bartek Iwańczuk
597ee38ef2 Rewrite readFile and writeFile (#2000)
Using open/read/write
2019-03-27 23:29:36 -04:00
Kevin (Kun) "Kassimo" Qian
077af20ceb Add seek and implement Seeker on File (#1797)
This patch contains a special hack that circumvents the current tokio
seek problem.

tokio `seek` is implemented to take ownership of the original File and
emit a new one in its future, which conflicts with the design of
ResourceTable.

To avoid the problem, the current hack makes the FsFile resource
an Option which we could `take` the value ownership out of it. We then
convert the tokio File into a Rust std File, perform the seek, and then
put it back into the resource.

This might be able to drop this hack after
https://github.com/tokio-rs/tokio/pull/785 lands.
2019-02-18 18:26:41 -05:00
bdistin
457e65bc2f docs/typo: readerIterator -> toAsyncIterator as exported (#1620) 2019-01-29 13:24:40 -05:00
Yoshiya Hinosawa
77114fbda4 chore: update license lines (#1557) 2019-01-21 13:03:30 -06:00
Ryan Dahl
b1579460ce Support streaming response bodies from fetch()
Also Buffer.readFrom in fetch() to buffer response.
2018-11-13 21:44:38 -08:00
Kitson Kelly
172f5a5133 Cleanups for runtime lib declarations. 2018-11-09 08:36:31 -08:00
Ryan Dahl
1f2c92c7c8 Reader/Writer should use Uint8Array not ArrayBufferView
Because many Reader/Writer implementations (e.g. bufio) assume their
able to use subarray() with byte indexes and often ask for byte values,
it makes sense to simply restrict all implementations to Uint8Array.
2018-11-09 07:22:05 -08:00
Bartek Iwańczuk
162eeca373 Add helper to turn deno.Reader into async iterator (#1130) 2018-10-31 07:29:13 -07:00
Kitson Kelly
10a97679ac Align JSDoc to style guide. 2018-10-14 17:38:23 -04:00
Ryan Dahl
c9f95d51da perf: Increase copy() buffer to 32k
This will improve the threshold benchmark. Using 32k because that's what
Go uses, but we should explore the value in the future.
a0d6420d8b/src/io/io.go (L391)
2018-10-12 08:58:17 -04:00
Ryan Dahl
bcbbee7399 Adds basic File I/O and FD table.
Adds deno.stdin, deno.stdout, deno.stderr, deno.open(), deno.write(),
deno.read(), deno.Reader, deno.Writer, deno.copy().

Fixes #721. tests/cat.ts works.
2018-09-28 20:53:33 -04:00