struct MapFile
XuAPI
pub struct MapFile {
pub name string
pub body string
pub dir bool
}Purpose
Public struct `MapFile`.
Parameters
namestring- name
bodystring- body
dirbool- directory
API
#testing/fstestIn-memory MapFS and a consistency check.
struct MapFilepub struct MapFile {
pub name string
pub body string
pub dir bool
}Public struct `MapFile`.
name stringbody stringdir boolstruct MapFSpub struct MapFS {
pub files []MapFile
}Public struct `MapFS`.
files []MapFilemap_fspub fn map_fs() MapFSMap fs.
none
MapFS — a value of this type
(&mut MapFS) addpub fn (fs &mut MapFS) add(name string, body string)Method on `&mut MapFS`: add.
fs &mut MapFSname stringbody string(&mut MapFS) add_dirpub fn (fs &mut MapFS) add_dir(name string)Method on `&mut MapFS`: add directory.
fs &mut MapFSname string(MapFS) read_filepub fn (fs MapFS) read_file(name string) stringMethod on `MapFS`: read file. Throws on failure.
fs MapFSname stringstring — result string
(MapFS) stat_dirpub fn (fs MapFS) stat_dir(name string) boolMethod on `MapFS`: stat directory.
fs MapFSname stringbool — true or false
(MapFS) haspub fn (fs MapFS) has(name string) boolCall `has` on `MapFS`.
fs MapFSname stringbool — true or false
testpub fn test(fs &MapFS) inttest; returns int. Throws on failure.
fs &MapFSint — a value of this type