Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Reemote 0.0.18 documentation
Reemote 0.0.18 documentation

Contents:

  • Installation
  • Examples
    • Hello World CLI Example
    • Hello World GUI Example
    • Make Directory API Example
    • Get Facts Example
    • Read and Write Files Example
    • Make Directory GUI Example
    • Hello World API Example
    • Installing vim on Alpine API Example
  • Inventory
  • Deployment
  • Using the Reemote GUI
  • Using the Reemote CLI
  • Tutorial
  • Creating files and directory structures on the server
  • Facts and Operations
  • Commands
    • apk commands
    • apt commands
    • dnf commands
    • dpkg commands
    • pacman commands
    • pip commands
    • pipx commands
    • yum commands
    • zypper commands
  • Operations
    • apk operations
    • apt operations
    • dnf operations
    • dpkg operations
    • builtin operations
    • filesystem operations
    • pacman operations
    • pip operations
    • pipx operations
    • scp operations
    • server operations
    • sftp operations
    • users operations
    • yum operations
    • zypper operations
  • Facts
    • apk facts
    • apt facts
    • command facts
    • dnf facts
    • dpkg facts
    • inventory facts
    • lxc facts
    • pacman facts
    • pip facts
    • pipx facts
    • server facts
    • sftp facts
    • yum facts
    • zypper facts
  • Deployments
    • file deployments
    • lxc deployments
    • nginx deployments
    • rust deployments
  • Callbacks
    • progress callbacks
  • utilities
Back to top
View this page

sftp facts¶

class reemote.facts.sftp.islink.Islink(path=None)[source]¶

Bases: object

A class to encapsulate the functionality of checking if a path refers to a symbolic link using SFTP islink in Unix-like operating systems.

path¶

The remote path to check (can be PurePath, str, or bytes).

Examples:

yield Islink(path="/path/to/symlink")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The boolean result for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The path must be a valid remote path accessible via SFTP.

class reemote.facts.sftp.get_lstat.Get_lstat(path: str)[source]¶

Bases: object

A class to encapsulate the functionality of lstat for getting builtin attributes using SFTP lstat in Unix-like operating systems. Unlike stat, lstat returns attributes of symlinks themselves rather than their targets.

file_path¶

The path of the builtin to get attributes for.

Type:

str

Examples:

yield Get_lstat(file_path="/path/to/symlink.txt")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The builtin attributes for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. Unlike stat, lstat returns attributes of symlinks themselves rather than the builtin they point to.

class reemote.facts.sftp.get_cwd.Get_cwd[source]¶

Bases: object

A class to encapsulate the functionality of cwd (get current working directory) in Unix-like operating systems.

Examples:

yield Getcwd()
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The current working directory for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context.

class reemote.facts.sftp.get_statvfs.Get_statvfs(path: str = None)[source]¶

Bases: object

A class to encapsulate the functionality of getting filesystem statistics using SFTP statvfs (stat on a filesystem path) in Unix-like operating systems.

path¶

The filesystem path to get statistics for.

Type:

str

Examples: .. code:: python

yield Get_statvfs(path=”/home/user”)

Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The filesystem statistics for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The path must be a valid filesystem path accessible via SFTP.

class reemote.facts.sftp.get_stat.Get_stat(path: str)[source]¶

Bases: object

A class to encapsulate the functionality of stat for getting builtin attributes using SFTP stat in Unix-like operating systems.

file_path¶

The path of the builtin to get attributes for.

Type:

str

Examples:

yield Get_stat(file_path="/path/to/builtin.txt")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The builtin attributes for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context.

class reemote.facts.sftp.exists.Exists(path: str = None)[source]¶

Bases: object

A class to encapsulate the functionality of checking if a remote path exists using SFTP exists method in Unix-like operating systems.

path¶

The remote path to check for existence.

Type:

str

Examples:

yield Exists(path="/path/to/check")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The existence check result for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The path must be a valid remote path accessible via SFTP.

class reemote.facts.sftp.isfile.Isfile(path=None)[source]¶

Bases: object

A class to encapsulate the functionality of checking if a path refers to a regular builtin using SFTP isfile in Unix-like operating systems.

path¶

The remote path to check (can be PurePath, str, or bytes).

Examples:

yield Isfile(path="/path/to/builtin.txt")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The boolean result for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The path must be a valid remote path accessible via SFTP.

class reemote.facts.sftp.get_fstat.Get_fstat(file_handle=None, flags: int = None)[source]¶

Bases: object

A class to encapsulate the functionality of getting builtin attributes using SFTP fstat (stat on an open builtin handle) in Unix-like operating systems.

file_handle¶

The open builtin handle to get attributes for.

flags¶

Flags indicating attributes of interest (SFTPv4 or later)

Type:

int

Examples:

yield Get_fstat(file_handle=file_handle)
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The builtin attributes for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The builtin handle must be an open SFTP builtin handle obtained from a previous operation.

class reemote.facts.sftp.isdir.Isdir(path=None)[source]¶

Bases: object

A class to encapsulate the functionality of checking if a path refers to a directory using SFTP isdir in Unix-like operating systems.

path¶

The remote path to check (can be PurePath, str, or bytes).

Examples:

yield Isdir(path="/path/to/directory")
Usage:

This class is designed to be used in a generator-based workflow where commands are yielded for execution. The boolean result for each host will be returned in the operation result.

Notes

The operation will execute on all hosts in the current execution context. The path must be a valid remote path accessible via SFTP.

Next
yum facts
Previous
server facts
Copyright © 2025, Kim Jarvis
Made with Sphinx and @pradyunsg's Furo
On this page
  • sftp facts
    • Islink
      • Islink.path
    • Get_lstat
      • Get_lstat.file_path
    • Get_cwd
    • Get_statvfs
      • Get_statvfs.path
    • Get_stat
      • Get_stat.file_path
    • Exists
      • Exists.path
    • Isfile
      • Isfile.path
    • Get_fstat
      • Get_fstat.file_handle
      • Get_fstat.flags
    • Isdir
      • Isdir.path