Struct kcore::chan::Chan [−][src]
pub struct Chan { /* fields omitted */ }
Expand description
Channel represents a virtual file from kernel’s perspective.
Implementations
impl Chan
[src]
impl Chan
[src]pub async fn attach(
dev: Arc<dyn Device + Send + Sync>,
aname: &[u8]
) -> Result<Arc<Self>>
[src]
pub async fn attach(
dev: Arc<dyn Device + Send + Sync>,
aname: &[u8]
) -> Result<Arc<Self>>
[src]Create a new mount space from the root of a device.
pub async fn path(self: &Arc<Chan>) -> Result<Vec<u8>>
[src]
pub async fn path(self: &Arc<Chan>) -> Result<Vec<u8>>
[src]Get the absolute path string of this chan.
pub async fn new(chan: &Arc<Chan>) -> Result<Arc<Self>>
[src]
pub async fn new(chan: &Arc<Chan>) -> Result<Arc<Self>>
[src]Create a new mount space rooted at a chan.
pub async fn mount(&self, old: &Arc<Self>) -> Result<()>
[src]
pub async fn mount(&self, old: &Arc<Self>) -> Result<()>
[src]Mount directory to this chan.
This will mount all union directories from old to this chan.
pub async fn bind(&self, old: &Arc<Self>) -> Result<()>
[src]
pub async fn bind(&self, old: &Arc<Self>) -> Result<()>
[src]Bind file to this chan.
Drop any previously bound chan.
pub async fn clear_mount(&self)
[src]
pub async fn clear_mount(&self)
[src]Remove all mount point of this chan.
pub async fn open(
self: &Arc<Self>,
path: &[u8],
create_dir: Option<bool>
) -> Result<Option<Arc<Self>>>
[src]
pub async fn open(
self: &Arc<Self>,
path: &[u8],
create_dir: Option<bool>
) -> Result<Option<Arc<Self>>>
[src]Open a file located at path starting from this chan.
Return NotFound if failed to find any directory components within the path. Otherwise it can find the parent directory.