Functions | |
| string | file_parent (string file_path) |
| string | file_basename (string file_path) |
| string | path_combine (string path1, string path2) |
| string | remove_trailing_slash (string path) |
| bool | file_exists (string file_path) |
| bool | file_delete (string file_path) |
| int64? | file_line_count (string file_path) |
| string? | file_read (string file_path) |
| string?[] | file_read_array (string file_path, char delimiter='\n') |
| bool | file_write (string file_path, string contents) |
| bool | file_copy (string src_file, string dest_file) |
| void | file_move (string src_file, string dest_file) |
| bool | file_is_symlink (string file_path) |
| bool | file_gzip (string src_file) |
| string | file_resolve_executable_path (string file_path) |
| string | file_get_symlink_target (string file_path) |
| bool | dir_exists (string dir_path) |
| bool | dir_create (string dir_path, bool show_message=false) |
| static bool | dir_empty_delete (string path) |
| static bool | dir_delete_recursive (string dir) |
| static bool | dir_delete (string dir_path, bool show_message=false) |
| bool | dir_is_empty (string dir_path) |
| Gee.ArrayList< string > | dir_list_names (string path) |
| string | format_file_size (uint64 size, bool binary_units=false, string unit="", bool show_units=true, int decimals=1) |
| string | escape_single_quote (string file_path) |
Variables | |
| const int64 | KB = 1000 |
| const int64 | MB = 1000 * KB |
| const int64 | GB = 1000 * MB |
| const int64 | TB = 1000 * GB |
| const int64 | KiB = 1024 |
| const int64 | MiB = 1024 * KiB |
| const int64 | GiB = 1024 * MiB |
| const int64 | TiB = 1024 * GiB |
| bool TeeJee.FileSystem.dir_create | ( | string | dir_path, |
| bool | show_message = false ) |
Definition at line 302 of file TeeJee.FileSystem.vala.
References _, dir_create(), Error, TeeJee.Logging.log_error(), and TeeJee.Logging.log_msg().
Referenced by AsyncTask.AsyncTask(), DeleteFileTask.build_script(), Main.check_btrfs_volume(), AppLock.create(), Main.create_pre_restore_snapshot_btrfs(), Main.create_snapshot_with_btrfs(), Main.create_snapshot_with_rsync(), dir_create(), Main.estimate_system_size(), file_write(), Main.fix_fstab_file(), Main.get_space_needed_for_rsync_snapshot(), TeeJee.ProcessHelper.init_tmp(), Main.load_app_config(), Main.Main(), Device.mount(), SmbMount.mount(), BastionGuardImport.TimeshiftImporter.mount_backup_device(), Main.mount_target_devices(), BackupDeviceBox.try_change_smb_share(), BastionGuardImport.TimeshiftImporter.update_bgbackup_config(), and SmbMount.write_shares().
|
static |
Definition at line 380 of file TeeJee.FileSystem.vala.
References _, dir_delete(), dir_delete_recursive(), TeeJee.Logging.log_error(), and TeeJee.Logging.log_msg().
Referenced by dir_delete(), and TeeJee.ProcessHelper.init_tmp().
|
static |
Definition at line 348 of file TeeJee.FileSystem.vala.
References dir_delete_recursive(), Error, and TeeJee.Logging.log_error().
Referenced by dir_delete(), and dir_delete_recursive().
|
static |
Definition at line 333 of file TeeJee.FileSystem.vala.
References dir_empty_delete(), and Error.
Referenced by dir_empty_delete().
| bool TeeJee.FileSystem.dir_exists | ( | string | dir_path | ) |
Definition at line 297 of file TeeJee.FileSystem.vala.
References dir_exists().
Referenced by AppExcludeEntry.add_app_exclude_entries_from_path(), Main.check_btrfs_volume(), Main.cleanup_unmount_devices(), Main.create_pre_restore_snapshot_btrfs(), dir_exists(), Main.fix_fstab_file(), SnapshotRepo.has_btrfs_system(), IconManager.init(), Main.load_app_config(), SnapshotRepo.load_snapshots(), SetupWizardWindow.probe_timeshift_snapshots_from_mounts(), Snapshot.read_control_file(), Snapshot.remove(), Subvolume.remove(), SnapshotRepo.remove_all(), SnapshotRepo.remove_sync_dir(), SnapshotRepo.remove_timeshift_dir(), Subvolume.restore(), and TeeJee.System.using_efi_boot().
| bool TeeJee.FileSystem.dir_is_empty | ( | string | dir_path | ) |
Definition at line 398 of file TeeJee.FileSystem.vala.
References dir_is_empty(), Error, and TeeJee.Logging.log_error().
Referenced by Main.check_btrfs_volume(), and dir_is_empty().
| Gee.ArrayList< string > TeeJee.FileSystem.dir_list_names | ( | string | path | ) |
Definition at line 421 of file TeeJee.FileSystem.vala.
References dir_list_names(), Error, and TeeJee.Logging.log_error().
Referenced by Main.cleanup_unmount_devices(), and dir_list_names().
| string TeeJee.FileSystem.escape_single_quote | ( | string | file_path | ) |
Definition at line 499 of file TeeJee.FileSystem.vala.
References escape_single_quote().
Referenced by Device.automount_udisks_iso(), DeleteFileTask.build_script(), RsyncSpaceCheckTask.build_script(), RsyncTask.build_script(), Main.cleanup_unmount_devices(), escape_single_quote(), TeeJee.ProcessHelper.exec_script_sync(), TeeJee.System.exo_open_folder(), file_gzip(), Device.get_disk_space_using_df(), Device.luks_unlock(), and TeeJee.System.xdg_open().
| string TeeJee.FileSystem.file_basename | ( | string | file_path | ) |
Definition at line 49 of file TeeJee.FileSystem.vala.
References file_basename().
Referenced by AppExcludeEntry.add_item(), Main.create_snapshot_with_rsync(), file_basename(), FileItem.from_disk_path_with_basic_info(), FileItem.from_path_and_type(), and Main.get_space_needed_for_rsync_snapshot().
| bool TeeJee.FileSystem.file_copy | ( | string | src_file, |
| string | dest_file ) |
Definition at line 191 of file TeeJee.FileSystem.vala.
References _, Error, file_copy(), and TeeJee.Logging.log_error().
Referenced by file_copy(), and Main.load_app_config().
| bool TeeJee.FileSystem.file_delete | ( | string | file_path | ) |
Definition at line 74 of file TeeJee.FileSystem.vala.
References _, Error, file_delete(), and TeeJee.Logging.log_error().
Referenced by Main.create_snapshot_with_rsync(), TeeJee.ProcessHelper.exec_script_sync(), CronTab.export(), file_delete(), file_gzip(), Snapshot.mark_for_deletion(), Snapshot.remove_control_file(), CronTab.remove_script_file(), and Main.restore_execute_rsync().
| bool TeeJee.FileSystem.file_exists | ( | string | file_path | ) |
Definition at line 68 of file TeeJee.FileSystem.vala.
References file_exists().
Referenced by CronTab.add_script_file(), Device.automount_udisks_iso(), SystemUser.check_encrypted_dirs(), Main.create_exclude_list_for_restore(), SetupWizardWindow.detect_timeshift_state(), CronTab.export(), file_exists(), file_gzip(), Device.find_device_in_list(), Main.fix_crypttab_file(), Main.fix_fstab_file(), Device.get_block_devices_using_lsblk(), Main.import_timeshift_config_if_available(), RestoreWindow.initialize_tab(), CronTab.install(), Main.load_app_config(), IconManager.lookup(), Snapshot.mark_for_deletion(), RsyncTask.parse_log(), Snapshot.read_control_file(), AsyncTask.read_exit_code(), CronTab.remove_script_file(), and MainWindow.view_snapshot_log().
| string TeeJee.FileSystem.file_get_symlink_target | ( | string | file_path | ) |
Definition at line 279 of file TeeJee.FileSystem.vala.
References Error, file_get_symlink_target(), and TeeJee.Logging.log_error().
Referenced by file_get_symlink_target(), and Device.find_device_in_list().
| bool TeeJee.FileSystem.file_gzip | ( | string | src_file | ) |
Definition at line 246 of file TeeJee.FileSystem.vala.
References escape_single_quote(), TeeJee.ProcessHelper.exec_sync(), file_delete(), file_exists(), and file_gzip().
Referenced by file_gzip(), and RsyncTask.parse_log().
| bool TeeJee.FileSystem.file_is_symlink | ( | string | file_path | ) |
Definition at line 225 of file TeeJee.FileSystem.vala.
References Error, file_is_symlink(), and TeeJee.Logging.log_error().
Referenced by file_is_symlink(), and Device.find_device_in_list().
| int64? TeeJee.FileSystem.file_line_count | ( | string | file_path | ) |
Definition at line 91 of file TeeJee.FileSystem.vala.
References _, Error, file_line_count(), TeeJee.Logging.log_error(), and MiB.
Referenced by Main.create_snapshot_with_rsync(), file_line_count(), and RsyncTask.parse_log().
| void TeeJee.FileSystem.file_move | ( | string | src_file, |
| string | dest_file ) |
Definition at line 208 of file TeeJee.FileSystem.vala.
References _, Error, file_move(), and TeeJee.Logging.log_error().
Referenced by file_move(), and Main.load_app_config().
| string TeeJee.FileSystem.file_parent | ( | string | file_path | ) |
Definition at line 45 of file TeeJee.FileSystem.vala.
References file_parent().
Referenced by TeeJee.ProcessHelper.exec_script_sync(), file_parent(), file_resolve_executable_path(), file_write(), FileItem.from_disk_path_with_basic_info(), FileItem.from_path_and_type(), Main.load_app_config(), RsyncTask.parse_log(), AsyncTask.read_exit_code(), and RsyncLogBox.relpath_for().
| string? TeeJee.FileSystem.file_read | ( | string | file_path | ) |
Definition at line 115 of file TeeJee.FileSystem.vala.
References _, Error, file_read(), and TeeJee.Logging.log_error().
Referenced by CronTab.add_script_file(), SystemUser.check_encrypted_dirs(), AppLock.create(), Main.create_exclude_list_for_restore(), Main.create_snapshot_with_rsync(), file_read(), Device.get_mounted_filesystems_using_mtab(), TeeJee.ProcessHelper.get_process_children(), TeeJee.ProcessHelper.get_process_parent(), Main.get_space_needed_for_rsync_snapshot(), TeeJee.System.get_system_uptime_seconds(), Main.live_system(), Snapshot.read_exclude_list(), AsyncTask.read_exit_code(), and SystemUser.read_users_from_file().
| string?[] TeeJee.FileSystem.file_read_array | ( | string | file_path, |
| char | delimiter = '\n' ) |
Definition at line 136 of file TeeJee.FileSystem.vala.
References _, Error, file_read_array(), and TeeJee.Logging.log_error().
Referenced by file_read_array(), and TeeJee.ProcessHelper.get_process_env().
| string TeeJee.FileSystem.file_resolve_executable_path | ( | string | file_path | ) |
Definition at line 258 of file TeeJee.FileSystem.vala.
References file_parent(), file_resolve_executable_path(), and path_combine().
Referenced by file_resolve_executable_path().
| bool TeeJee.FileSystem.file_write | ( | string | file_path, |
| string | contents ) |
Definition at line 165 of file TeeJee.FileSystem.vala.
References _, dir_create(), Error, file_parent(), file_write(), and TeeJee.Logging.log_error().
Referenced by CronTab.add_job(), CronTab.add_script_file(), CronTab.export(), file_write(), RsyncTask.finish_task(), Snapshot.mark_for_deletion(), CronTab.remove_job(), Main.restore_execute_rsync(), Main.save_exclude_list_for_backup(), Main.save_exclude_list_for_restore(), and AppLock.write_lock_file().
| string TeeJee.FileSystem.format_file_size | ( | uint64 | size, |
| bool | binary_units = false, | ||
| string | unit = "", | ||
| bool | show_units = true, | ||
| int | decimals = 1 ) |
Definition at line 450 of file TeeJee.FileSystem.vala.
References format_file_size().
Referenced by BackupDeviceBox.add_device_row(), BackupDeviceBox.add_smb_row(), SnapshotRow.build_meta_text(), Main.create_snapshot_for_tag(), Device.description_formatted(), Device.description_free(), Device.description_full_free(), Device.description_simple_formatted(), format_file_size(), SnapshotRepo.from_path(), SnapshotRepo.has_space(), SnapshotRepo.init_from_device(), AppConsole.list_all_devices(), Device.print_device_disk_space(), Device.tooltip_text(), and MainWindow.update_statusbar().
| string TeeJee.FileSystem.path_combine | ( | string | path1, |
| string | path2 ) |
Definition at line 53 of file TeeJee.FileSystem.vala.
References path_combine().
Referenced by Main.add_app_exclude_entries(), Main.add_app_exclude_entries_for_prefix(), AsyncTask.AsyncTask(), Main.check_btrfs_volume(), AppLock.create(), Main.create_exclude_list_for_restore(), Main.create_pre_restore_snapshot_btrfs(), Main.create_snapshot_with_btrfs(), Main.create_snapshot_with_rsync(), Subvolume.detect_subvolumes_for_system_by_path(), Main.estimate_system_size(), file_resolve_executable_path(), Main.fix_crypttab_file(), Main.fix_fstab_file(), Device.get_block_devices_using_lsblk(), Main.get_space_needed_for_rsync_snapshot(), SnapshotRepo.has_btrfs_system(), IconManager.lookup(), Main.Main(), SmbMount.mount(), RsyncTask.parse_log(), path_combine(), SetupWizardWindow.probe_timeshift_snapshots_from_mounts(), Snapshot.read_control_file(), Snapshot.read_crypttab_file(), Snapshot.read_fstab_file(), Subvolume.remove(), Subvolume.restore(), Main.restore_execute_rsync(), Main.restore_other_gui(), Main.save_exclude_list_for_backup(), BackupDeviceBox.try_change_smb_share(), and SnapshotRepo.unlock_and_mount_devices().
| string TeeJee.FileSystem.remove_trailing_slash | ( | string | path | ) |
Definition at line 57 of file TeeJee.FileSystem.vala.
References remove_trailing_slash().
Referenced by DeleteFileTask.build_script(), RsyncSpaceCheckTask.build_script(), RsyncTask.build_script(), and remove_trailing_slash().
|
static |
Definition at line 36 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 40 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 34 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 38 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 35 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 39 of file TeeJee.FileSystem.vala.
Referenced by file_line_count().
|
static |
Definition at line 37 of file TeeJee.FileSystem.vala.
|
static |
Definition at line 41 of file TeeJee.FileSystem.vala.