fn add_file_event(
        &mut self,
        root: VfsRoot,
        path: RelativePathBuf,
        text: String,
        is_overlay: bool,
    ) -> Option<VfsFile> {
        let text = Arc::new(text);
        let file = self.raw_add_file(root, path.clone(), text.clone(), is_overlay);
        self.pending_changes.push(VfsChange::AddFile { file, root, path, text });
        Some(file)
    }
// *_event calls change the state of VFS and push a change onto pending
// changes array.
_event calls change the state of VFS and push a change onto pending
changes array.
_event calls change the state of VFS and push a change onto pending changes array .
fn add_file_event(
        &mut self,
        root: VfsRoot,
        path: RelativePathBuf,
        text: String,
        is_overlay: bool,
    ) -> Option<VfsFile> {
        let text = Arc::new(text);
        let file = self.raw_add_file(root, path.clone(), text.clone(), is_overlay);
        self.pending_changes.push(VfsChange::AddFile { file, root, path, text });
        Some(file)
    }
fn add_file_event ( & mut self , root : VfsRoot , path : RelativePathBuf , text : String , is_overlay : bool , ) -> Option < VfsFile > { let text = Arc :: new ( text ) ; let file = self . raw_add_file ( root , path . clone ( ) , text . clone ( ) , is_overlay ) ; self . pending_changes . push ( VfsChange :: AddFile { file , root , path , text } ) ; Some ( file ) }
_event calls change the state of VFS and push a change onto pending
changes array.
_event calls change the state of VFS and push a change onto pending changes array .
&mut self
root
VfsRoot
path
RelativePathBuf
text
String
is_overlay
bool