| // Copyright 2018 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.io; |
| |
| using zx; |
| |
| protocol File { |
| compose File1; |
| compose File2; |
| }; |
| |
| /// File defines the interface of a node which contains a flat layout of data. |
| protocol File1 { |
| compose Node1; |
| |
| /// Writes data at the seek offset. |
| /// The seek offset is moved forward by the number of bytes written. |
| /// |
| /// This method requires following rights: `OpenFlags.RIGHT_WRITABLE`, otherwise returns |
| /// `ZX_ERR_BAD_HANDLE`. |
| // TODO(https://fxbug.dev/88872): Remove this method when pkgfs has been deleted. |
| @transitional("only implemented by pkgfs") |
| @selector("fuchsia.io1/File.Write") |
| @deprecated("replaced by File2.Write") |
| WriteDeprecated(struct { |
| data vector<uint8>:MAX_BUF; |
| }) -> (struct { |
| s zx.status; |
| actual uint64; |
| }); |
| }; |