[][src]Function librapidarchive::fs::portable::open_tape

pub fn open_tape<P: AsRef<Path>>(_tapedev: P) -> Result<Box<dyn TapeDevice>> where
    OsString: From<P>,
    P: Clone

Open an object for total control of a tape device.

Parameters

This function accepts the name of an output device corresponding to a tape device. The namespace exposed by open_tape must be identical to that of open_sink, at least in the case where such names within the space correspond to tape devices.

(e.g. open_sink("/dev/nst0") must match open_tape("/dev/nst0"), but open_tape("/dev/sda0") is allowed to error.)

Returns

If the path given in outfile names a valid tape device, a boxed tape::TapeDevice will be returned by which you can control the tape.

It is implementation-defined whether it is allowed to open a tape device twice. To avoid having to do that, tape::TapeDevice conveniently inherits io::Write.

Platform considerations

This is the portable version of the function. Since portable tape access isn't a thing that makes sense, this function only returns errors.