|
|
@ -9,7 +9,6 @@ use std::io::Result as IoResult; |
|
|
|
use std::io::ErrorKind as IoErrorKind; |
|
|
|
use std::io::ErrorKind as IoErrorKind; |
|
|
|
|
|
|
|
|
|
|
|
use std::ffi::OsString; |
|
|
|
use std::ffi::OsString; |
|
|
|
use std::marker::PhantomData; |
|
|
|
|
|
|
|
use std::ptr; |
|
|
|
use std::ptr; |
|
|
|
use std::slice; |
|
|
|
use std::slice; |
|
|
|
use std::mem; |
|
|
|
use std::mem; |
|
|
@ -83,9 +82,7 @@ pub enum ArchiveID { |
|
|
|
/// until an instance of this struct is created.
|
|
|
|
/// until an instance of this struct is created.
|
|
|
|
///
|
|
|
|
///
|
|
|
|
/// The service exits when all instances of this struct go out of scope.
|
|
|
|
/// The service exits when all instances of this struct go out of scope.
|
|
|
|
pub struct Fs { |
|
|
|
pub struct Fs(()); |
|
|
|
pd: PhantomData<i32>, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// Handle to an open filesystem archive.
|
|
|
|
/// Handle to an open filesystem archive.
|
|
|
|
///
|
|
|
|
///
|
|
|
@ -304,9 +301,9 @@ impl Fs { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
let r = fsInit(); |
|
|
|
let r = fsInit(); |
|
|
|
if r < 0 { |
|
|
|
if r < 0 { |
|
|
|
Err(::Error::from(r)) |
|
|
|
Err(r.into()) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
Ok(Fs { pd: PhantomData }) |
|
|
|
Ok(Fs(())) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|