pub struct FileManager { /* private fields */ }Expand description
Tracks all state related to open files.
Implementations§
Source§impl FileManager
impl FileManager
pub fn new(watcher: FileWatcher) -> Self
pub fn watcher(&mut self) -> &mut FileWatcher
pub fn get_info(&self, id: BufferId) -> Option<&FileInfo>
pub fn get_editor(&self, path: &Path) -> Option<BufferId>
Sourcepub fn check_file(&mut self, path: &Path, id: BufferId) -> bool
pub fn check_file(&mut self, path: &Path, id: BufferId) -> bool
Returns true if this file is open and has changed on disk.
This state is stashed.
pub fn open(&mut self, path: &Path, id: BufferId) -> Result<Rope, FileError>
pub fn close(&mut self, id: BufferId)
pub fn save( &mut self, path: &Path, text: &Rope, id: BufferId, ) -> Result<(), FileError>
Auto Trait Implementations§
impl !Freeze for FileManager
impl RefUnwindSafe for FileManager
impl Send for FileManager
impl Sync for FileManager
impl Unpin for FileManager
impl UnsafeUnpin for FileManager
impl UnwindSafe for FileManager
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