O'Reilly logo

Dart: Scalable Application Development by Ivo Balbaert, Sergey Akopkokhyants, Davy Mitchell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Working with Files and Streams

In this chapter, we will cover the following recipes:

  • Reading and processing a file line by line
  • Writing to a file
  • Searching in a file
  • Concatenating files
  • Downloading a file
  • Working with blobs
  • Transforming streams

Introduction

Working with files is the bread and butter of every programming language when reaching out for data in the environment. The classes and methods dealing with this functionality can be found in the dart:io package, together with support for networking (sockets and HTTP). This package can only be used in Dart command-line applications, not in browser apps, so our code runs in a Dart VM.

When working with files, and I/O in general, there are two modes of operation:

  • Synchronous operations, where ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required