bem_filesystem Module

Minimal POSIX filesystem operations: directories, atomic rename, advisory locks and the cache location. They hold no runtime state, so config, runtime and the periodic operator cache use them from core.


Uses

  • module~~bem_filesystem~~UsesGraph module~bem_filesystem bem_filesystem iso_c_binding iso_c_binding module~bem_filesystem->iso_c_binding

Used by

  • module~~bem_filesystem~~UsedByGraph module~bem_filesystem bem_filesystem module~bem_app_config_types bem_app_config_types module~bem_app_config_types->module~bem_filesystem module~bem_checkpoint_contract bem_checkpoint_contract module~bem_checkpoint_contract->module~bem_filesystem module~bem_coulomb_fmm_periodic_cache bem_coulomb_fmm_periodic_cache module~bem_coulomb_fmm_periodic_cache->module~bem_filesystem module~bem_coulomb_fmm_periodic_cell_cache bem_coulomb_fmm_periodic_cell_cache module~bem_coulomb_fmm_periodic_cell_cache->module~bem_filesystem module~bem_coulomb_fmm_periodic_cell_cache->module~bem_coulomb_fmm_periodic_cache module~bem_coulomb_fmm_plan_ops bem_coulomb_fmm_plan_ops module~bem_coulomb_fmm_plan_ops->module~bem_filesystem module~bem_coulomb_fmm_periodic_root_ops bem_coulomb_fmm_periodic_root_ops module~bem_coulomb_fmm_plan_ops->module~bem_coulomb_fmm_periodic_root_ops module~bem_output_writer bem_output_writer module~bem_output_writer->module~bem_filesystem module~bem_output_writer->module~bem_app_config_types module~bem_output_writer->module~bem_checkpoint_contract module~bem_surface_current_model bem_surface_current_model module~bem_output_writer->module~bem_surface_current_model module~bem_output_writer_history bem_output_writer_history module~bem_output_writer_history->module~bem_filesystem module~bem_output_writer_history->module~bem_output_writer module~bem_output_writer_summary bem_output_writer_summary module~bem_output_writer_summary->module~bem_filesystem module~bem_output_writer_summary->module~bem_checkpoint_contract module~bem_output_writer_summary->module~bem_output_writer module~bem_irradiation_cell_contract bem_irradiation_cell_contract module~bem_output_writer_summary->module~bem_irradiation_cell_contract module~bem_output_writer_summary->module~bem_surface_current_model module~bem_periodic_checkpoint bem_periodic_checkpoint module~bem_periodic_checkpoint->module~bem_filesystem module~bem_periodic_checkpoint->module~bem_app_config_types module~bem_periodic_checkpoint->module~bem_checkpoint_contract module~bem_periodic_checkpoint->module~bem_output_writer module~bem_restart bem_restart module~bem_periodic_checkpoint->module~bem_restart module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_types module~bem_app_config_parser bem_app_config_parser module~bem_app_config->module~bem_app_config_parser module~bem_app_config_runtime bem_app_config_runtime module~bem_app_config->module~bem_app_config_runtime module~bem_app_config_authoring bem_app_config_authoring module~bem_app_config_authoring->module~bem_app_config_types module~bem_app_config_authoring_types bem_app_config_authoring_types module~bem_app_config_authoring->module~bem_app_config_authoring_types module~bem_app_config_authoring_types->module~bem_app_config_types module~bem_app_config_mesh_runtime bem_app_config_mesh_runtime module~bem_app_config_mesh_runtime->module~bem_app_config_types module~bem_app_config_parser->module~bem_app_config_types module~bem_app_config_parser->module~bem_app_config_authoring module~bem_config_toml bem_config_toml module~bem_app_config_parser->module~bem_config_toml module~bem_config_layout bem_config_layout module~bem_app_config_parser->module~bem_config_layout module~bem_app_config_parser_preflight_particles bem_app_config_parser_preflight_particles module~bem_app_config_parser_preflight_particles->module~bem_app_config_types module~bem_app_config_parser_preflight_particles->module~bem_app_config_parser module~bem_config_helpers bem_config_helpers module~bem_app_config_parser_preflight_particles->module~bem_config_helpers module~bem_app_config_parser_preflight_surface bem_app_config_parser_preflight_surface module~bem_app_config_parser_preflight_surface->module~bem_app_config_types module~bem_app_config_parser_preflight_surface->module~bem_app_config_parser module~bem_app_config_parser_preflight_surface->module~bem_config_helpers module~bem_app_config_particle_runtime bem_app_config_particle_runtime module~bem_app_config_particle_runtime->module~bem_app_config_types module~bem_app_config_potential_runtime bem_app_config_potential_runtime module~bem_app_config_particle_runtime->module~bem_app_config_potential_runtime module~bem_app_config_particle_runtime->module~bem_config_helpers module~bem_app_config_potential_runtime->module~bem_app_config_types module~bem_app_config_potential_runtime->module~bem_config_helpers module~bem_app_config_potential_runtime->module~bem_irradiation_cell_contract module~bem_config_helpers->module~bem_app_config_types module~bem_config_toml->module~bem_app_config_types module~bem_coulomb_fmm_core_build bem_coulomb_fmm_core_build module~bem_coulomb_fmm_core_build->module~bem_coulomb_fmm_plan_ops module~bem_coulomb_fmm_periodic_root_ops->module~bem_coulomb_fmm_periodic_cache module~bem_coulomb_fmm_periodic_root_ops->module~bem_coulomb_fmm_periodic_cell_cache module~bem_irradiation_cell_contract->module~bem_app_config_types module~bem_output_writer_files bem_output_writer_files module~bem_output_writer_files->module~bem_output_writer module~bem_restart->module~bem_app_config_types module~bem_restart->module~bem_checkpoint_contract module~bem_restart_contract bem_restart_contract module~bem_restart_contract->module~bem_checkpoint_contract module~bem_restart_contract->module~bem_restart module~bem_run_outputs bem_run_outputs module~bem_run_outputs->module~bem_app_config_types module~bem_run_outputs->module~bem_output_writer module~bem_run_outputs->module~bem_periodic_checkpoint module~bem_simulator bem_simulator module~bem_simulator->module~bem_output_writer module~bem_simulator->module~bem_app_config module~bem_simulator->module~bem_config_helpers module~bem_simulator->module~bem_irradiation_cell_contract module~bem_simulator->module~bem_run_outputs module~bem_simulator->module~bem_surface_current_model module~bem_simulator->module~bem_app_config_runtime module~bem_particle_stepper bem_particle_stepper module~bem_simulator->module~bem_particle_stepper module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_output_writer module~bem_simulator_io->module~bem_simulator module~bem_simulator_io->module~bem_app_config_runtime module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_output_writer module~bem_simulator_loop->module~bem_periodic_checkpoint module~bem_simulator_loop->module~bem_run_outputs module~bem_simulator_loop->module~bem_simulator module~bem_simulator_loop->module~bem_app_config_runtime module~bem_zhao_outflow_refresh bem_zhao_outflow_refresh module~bem_simulator_loop->module~bem_zhao_outflow_refresh module~bem_surface_current_model->module~bem_app_config_types module~bem_surface_current_model->module~bem_config_helpers module~bem_surface_current_model->module~bem_irradiation_cell_contract program~main main program~main->module~bem_checkpoint_contract program~main->module~bem_output_writer program~main->module~bem_periodic_checkpoint program~main->module~bem_app_config program~main->module~bem_restart program~main->module~bem_run_outputs program~main->module~bem_simulator module~bem_app_config_authoring_domain bem_app_config_authoring_domain module~bem_app_config_authoring_domain->module~bem_app_config_authoring module~bem_app_config_authoring_geometry bem_app_config_authoring_geometry module~bem_app_config_authoring_geometry->module~bem_app_config_authoring module~bem_app_config_authoring_sources bem_app_config_authoring_sources module~bem_app_config_authoring_sources->module~bem_app_config_authoring module~bem_app_config_parser_finalize bem_app_config_parser_finalize module~bem_app_config_parser_finalize->module~bem_app_config_parser module~bem_app_config_parser_preflight_sim bem_app_config_parser_preflight_sim module~bem_app_config_parser_preflight_sim->module~bem_app_config_parser module~bem_app_config_parser_read_mesh bem_app_config_parser_read_mesh module~bem_app_config_parser_read_mesh->module~bem_app_config_parser module~bem_app_config_parser_read_particles bem_app_config_parser_read_particles module~bem_app_config_parser_read_particles->module~bem_app_config_parser module~bem_app_config_parser_read_sim bem_app_config_parser_read_sim module~bem_app_config_parser_read_sim->module~bem_app_config_parser module~bem_app_config_parser_read_surface bem_app_config_parser_read_surface module~bem_app_config_parser_read_surface->module~bem_app_config_parser module~bem_app_config_parser_validate bem_app_config_parser_validate module~bem_app_config_parser_validate->module~bem_app_config_parser module~bem_app_config_parser_validate->module~bem_config_helpers module~bem_app_config_particle_runtime_batch bem_app_config_particle_runtime_batch module~bem_app_config_particle_runtime_batch->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_sampling bem_app_config_particle_runtime_sampling module~bem_app_config_particle_runtime_sampling->module~bem_app_config_particle_runtime module~bem_app_config_particle_runtime_slots bem_app_config_particle_runtime_slots module~bem_app_config_particle_runtime_slots->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_mesh_runtime module~bem_app_config_runtime->module~bem_app_config_particle_runtime module~bem_app_config_runtime->module~bem_app_config_potential_runtime module~bem_config_layout->module~bem_config_toml module~bem_particle_stepper->module~bem_irradiation_cell_contract module~bem_restart_injection bem_restart_injection module~bem_restart_injection->module~bem_restart module~bem_restart_records bem_restart_records module~bem_restart_records->module~bem_restart module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_config_helpers module~bem_simulator_particles->module~bem_simulator module~bem_simulator_particles->module~bem_particle_stepper module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator module~bem_zhao_outflow_refresh->module~bem_app_config module~bem_zhao_outflow_refresh->module~bem_irradiation_cell_contract module~bem_zhao_outflow_refresh->module~bem_surface_current_model

Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: filesystem_success = 0
integer, public, parameter :: filesystem_empty_path = 1
integer, public, parameter :: filesystem_not_directory = 2
integer, public, parameter :: filesystem_os_error = 3

Functions

public function default_periodic_cache_directory(missing_ok) result(path)

User cache shared across working directories; an explicit configuration path takes precedence.

Arguments

Type IntentOptional Attributes Name
logical, intent(in), optional :: missing_ok

Return Value character(len=:), allocatable


Subroutines

public subroutine atomic_rename(old_path, new_path, status)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: old_path
character(len=*), intent(in) :: new_path
integer, intent(out) :: status

public subroutine remove_file_if_exists(path, status)

Remove one named file; a missing file counts as success. unlink never removes a directory.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
integer, intent(out) :: status

public subroutine acquire_file_lock(path, lock_fd, status)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
integer, intent(out) :: lock_fd
integer, intent(out) :: status

public subroutine release_file_lock(lock_fd, status)

Arguments

Type IntentOptional Attributes Name
integer, intent(inout) :: lock_fd
integer, intent(out) :: status

public subroutine create_directories(path, status)

Recursively create a directory path without invoking a shell.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: path
integer, intent(out) :: status