Document structs in fslib
This commit is contained in:
parent
d2e06c9a70
commit
6a194e98e8
@ -1,11 +1,11 @@
|
||||
//! # File system library
|
||||
//! # Filesystem library
|
||||
//!
|
||||
//! The `lb:fs` library provides synchronous and asynchronous utilities for interacting with the
|
||||
//! file system.
|
||||
//! filesystem.
|
||||
//!
|
||||
//! ## Asynchronous by default
|
||||
//!
|
||||
//! File system operations are blocking by nature; to provide asynchronicity, luby performs blocking
|
||||
//! Filesystem operations are blocking by nature; to provide asynchronicity, luby performs blocking
|
||||
//! operations in a background thread pool by default. Synchronous complements to all asynchronous
|
||||
//! functions are always provided.
|
||||
//!
|
||||
@ -98,6 +98,7 @@ impl lb_lsdir_sync {
|
||||
}
|
||||
}
|
||||
|
||||
/// Entry inside of a directory on the filesystem.
|
||||
#[derive(Debug, From)]
|
||||
#[cdef]
|
||||
pub struct lb_dirent(#[opaque] tokio::fs::DirEntry);
|
||||
@ -131,6 +132,7 @@ impl lb_dirent {
|
||||
}
|
||||
}
|
||||
|
||||
/// Synchronous version of [`lb_dirent`].
|
||||
#[derive(Debug, From)]
|
||||
#[cdef]
|
||||
pub struct lb_dirent_sync(#[opaque] std::fs::DirEntry);
|
||||
@ -165,6 +167,7 @@ impl lb_dirent_sync {
|
||||
}
|
||||
}
|
||||
|
||||
/// Structure representing a type of file with accessors for each file type.
|
||||
#[derive(Debug, From)]
|
||||
#[cdef]
|
||||
pub struct lb_file_type(#[opaque] std::fs::FileType);
|
||||
@ -198,6 +201,7 @@ impl lb_file_type {
|
||||
}
|
||||
}
|
||||
|
||||
/// Metadata information about a file.
|
||||
#[derive(Debug, From)]
|
||||
#[cdef]
|
||||
pub struct lb_file_meta(#[opaque] std::fs::Metadata);
|
||||
@ -270,6 +274,7 @@ impl lb_file_meta {
|
||||
}
|
||||
}
|
||||
|
||||
/// Representation of the various permissions on a file.
|
||||
#[derive(Debug, From)]
|
||||
#[cdef]
|
||||
pub struct lb_file_perms(#[opaque] std::fs::Permissions);
|
||||
|
Loading…
x
Reference in New Issue
Block a user