A tmpfiles.d implementation for UNIX-like operating systems.
// dtmp: A tmpfiles.d implementation for UNIX-like operating systems.
// Copyright (C) 2025  Aster Boese
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <https://www.gnu.org/licenses/>.

use clap::{Parser, Subcommand};

#[derive(Parser)]
#[command(version, about, long_about = None)]
pub struct Cli {
	//
	// Actions
	//
	/// Create and adjust files and directories
	#[arg(long)]
	pub create: bool,
	/// Clean up files and directories
	#[arg(long)]
	pub clean: bool,
	/// Remove files and directories marked for removal
	#[arg(long)]
	pub remove: bool,
	/// Delete files and directories marked for creation
	#[arg(long)]
	pub purge: bool,

	//
	// Modifiers
	//
	/// Print operations instead of doing them
	#[arg(short, long)]
	pub dry_run: bool,
	/// Execute user configuration instead of system
	#[arg(short, long)]
	pub user: bool,
	/// Operate on another root filesystem
	#[arg(short, long)]
	pub root: Option<String>,
}

#[derive(Subcommand)]
pub enum Commands {
	/// Create and adjust files and directories
	Create,
	/// Clean up files and directories
	Clean,
	/// Remove files and directories marked for removal
	Remove,
	/// Remove files and directories marked for creation
	Purge,
}