Frama-C API - User_dir
User directories (session, config, state, ...). We do not expect these directories/files to exist. Several roots are provided in Plugin, namely Plugin.Session, Plugin.Cache_dir, Plugin.Config_dir and Plugin.State_dir.
val get_dir : ?create_path:bool -> string -> Filepath.tget_dir ~create_path name tries to get the directory name. The function aborts if:
- a file named
nameexists, - creating a the directory fails.
Otherwise returns the path, and creates it if create_path is true (it defaults to false). Subdirectories modules can be created with Builder.Make_user_dir and Builder.Make_user_dir_opt.
val get_file : ?create_path:bool -> string -> Filepath.tget_file ~create_path name tries to get the file name. The function aborts if:
- a directory named
nameexists, - creating the path to the file fails.
Otherwise returns the path, and creates the directories that lead to the file if create_path is true (it defaults to false). The file is *not* created by the function.
