pub struct FileUri {
pub uri: String,
pub document_top_tree_uri: Option<String>,
}
Expand description
Path to represent a file or directory.
§Note
For compatibility, an interconversion to tauri_plugin_fs::FilePath
is implemented, such as follwing.
This is lossy and also not guaranteed to work properly with other plugins.
However, reading and writing files by official tauri_plugin_fs
etc. should work well.
use tauri_plugin_android_fs::FileUri;
use tauri_plugin_fs::FilePath;
let uri: FileUri = unimplemented!();
let path: FilePath = uri.into();
let uri: FileUri = path.into();
§Typescript type
type FileUri = {
uri: string, // This can use as path for official tauri_plugin_fs
documentTopTreeUri: string | null
}
Fields§
§uri: String
file://
or content://
URI of file or directory.
document_top_tree_uri: Option<String>
Only files/directories under the directory obtained by AndroidFs::show_manage_dir_dialog will own this.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileUri
impl<'de> Deserialize<'de> for FileUri
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FileUri
impl StructuralPartialEq for FileUri
Auto Trait Implementations§
impl Freeze for FileUri
impl RefUnwindSafe for FileUri
impl Send for FileUri
impl Sync for FileUri
impl Unpin for FileUri
impl UnwindSafe for FileUri
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
impl<'de, D, R> CommandArg<'de, R> for Dwhere
D: Deserialize<'de>,
R: Runtime,
Source§fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
fn from_command(command: CommandItem<'de, R>) -> Result<D, InvokeError>
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.