Method in path · Path coil-stdlib

Path::write_bytes

pub fn write_bytes(Vec<byte> buf) -> Result<int, IoError>
Import
use path::{Path};
Source: src/path.hy

Replaces the file’s contents with buf. See io::file::write_bytes.

Called on a Path value as value.write_bytes(…).

Parameters#

NameType
bufVec<byte>

Returns#

Result<int, IoError>

See also#

  • io::file::write_bytes
  • Path: A file-system path, with helpers to take it apart and to use it.
  • Path::from: Creates a path from s as written.
  • Path::as_str: Returns the path as a string.
  • Path::join: Returns this path followed by other, with exactly one separator between them.
  • Path::dirname: Returns the path without its last component.
  • Path::basename: Returns the last component, ignoring trailing separators ("" for an empty path or /).
  • Path::extension: Returns the text after the last . of the last component, or "" when there is none.
↑ ↓ navigate ↵ open