Path Finder Module Reference

New in version 0.3.0.

Control OmniWeb using JXA-like syntax.

Classes:

XAPathFinderActiveTarget(properties)

A class for interacting with active targets in Path Finder.

XAPathFinderActiveTargetList(properties[, ...])

A wrapper around lists of Path Finder active targets that employs fast enumeration techniques.

XAPathFinderApplication(properties)

A class for managing and interacting with Path Finder.app.

XAPathFinderContainer(properties)

A class for interacting with containers in Path Finder.

XAPathFinderContainerList(properties[, ...])

A wrapper around lists of Path Finder containers that employs fast enumeration techniques.

XAPathFinderDisk(properties)

A class for interacting with disks in Path Finder.

XAPathFinderDiskList(properties[, filter])

A wrapper around lists of Path Finder disks that employs fast enumeration techniques.

XAPathFinderDocument(properties)

A class for interacting with documents in Path Finder.

XAPathFinderDocumentList(properties[, filter])

A wrapper around lists of Path Finder documents that employs fast enumeration techniques.

XAPathFinderFile(properties)

A class for interacting with files in Path Finder.

XAPathFinderFileList(properties[, filter])

A wrapper around lists of Path Finder files that employs fast enumeration techniques.

XAPathFinderFinderWindow(properties)

A class for interacting with finder windows in Path Finder.

XAPathFinderFinderWindowList(properties[, ...])

A wrapper around lists of Path Finder finder windows that employs fast enumeration techniques.

XAPathFinderFolder(properties)

A class for interacting with Path Finder folders and their contents.

XAPathFinderFolderList(properties[, filter])

A wrapper around lists of Path Finder folders that employs fast enumeration techniques.

XAPathFinderInfoWindow(properties)

A class for interacting with info windows in Path Finder.

XAPathFinderInfoWindowList(properties[, filter])

A wrapper around lists of Path Finder info windows that employs fast enumeration techniques.

XAPathFinderItem(properties)

A class for interacting with items in Path Finder.

XAPathFinderItemList(properties[, filter, ...])

A wrapper around lists of Path Finder items that employs fast enumeration techniques.

XAPathFinderLeftTarget(properties)

A class for interacting with left targets in Path Finder.

XAPathFinderLeftTargetList(properties[, filter])

A wrapper around lists of Path Finder left targets that employs fast enumeration techniques.

XAPathFinderRightTarget(properties)

A class for interacting with right targets in Path Finder.

XAPathFinderRightTargetList(properties[, filter])

A wrapper around lists of Path Finder right targets that employs fast enumeration techniques.

XAPathFinderWindow(properties)

A window of Path Finder.app.

class PyXA.apps.PathFinder.XAPathFinderActiveTarget(properties)[source]

Bases: XAPathFinderContainer

A class for interacting with active targets in Path Finder.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderActiveTargetList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderContainer

A wrapper around lists of Path Finder active targets that employs fast enumeration techniques.

All properties of active targets can be called as methods on the wrapped list, returning a list containing each active target’s value for the property.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderApplication(properties)[source]

Bases: XASBApplication, XACanOpenPath, XACanPrintPath

A class for managing and interacting with Path Finder.app.

New in version 0.3.0.

Methods:

add_toolbar_item(item[, position])

Adds an item to the toolbar.

disks()

Returns a list of the disks in Path Finder.

empty()

Empties the trash.

finder_windows()

Returns a list of the finder windows in Path Finder.

info_windows()

Returns a list of the info windows in Path Finder.

remove_toolbar_item(item)

Removes an item from the toolbar.

Attributes:

desktop

frontmost

Whether Path Finder is the frontmost application.

home

name

The name of the application.

selection

startup_disk

trash

version

The version of Path Finder.app.

add_toolbar_item(item: str | XAPathFinderItem | XAPath, position: int = 0) int[source]

Adds an item to the toolbar.

Parameters:
  • item (Union[str, XAPathFinderItem]) – The item to add.

  • position (int, optional) – The target position to add the item at, defaults to 0.

Returns:

The actual position of the item.

property desktop: XAPathFinderFolder
disks() XAPathFinderDiskList[source]

Returns a list of the disks in Path Finder.

empty() None[source]

Empties the trash.

finder_windows() XAPathFinderFinderWindowList[source]

Returns a list of the finder windows in Path Finder.

property frontmost: bool

Whether Path Finder is the frontmost application.

property home: XAPathFinderFolder
info_windows() XAPathFinderInfoWindowList[source]

Returns a list of the info windows in Path Finder.

property name: str

The name of the application.

remove_toolbar_item(item: str | XAPathFinderItem | XAPath) int[source]

Removes an item from the toolbar.

Parameters:

item (Union[str, XAPathFinderItem]) – The item to remove.

Returns:

The position of the item prior to removal.

property selection: XAPathFinderItemList
property startup_disk: XAPathFinderDisk
property trash: XAPathFinderFolder
property version: str

The version of Path Finder.app.

class PyXA.apps.PathFinder.XAPathFinderContainer(properties)[source]

Bases: XAPathFinderItem

A class for interacting with containers in Path Finder.

New in version 0.3.0.

Methods:

files()

Returns a list of the files in the container.

folders()

Returns a list of the folders in the container.

files() XAPathFinderFileList[source]

Returns a list of the files in the container.

folders() XAPathFinderFolderList[source]

Returns a list of the folders in the container.

class PyXA.apps.PathFinder.XAPathFinderContainerList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XAPathFinderItemList

A wrapper around lists of Path Finder containers that employs fast enumeration techniques.

All properties of containers can be called as methods on the wrapped list, returning a list containing each container’s value for the property.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderDisk(properties)[source]

Bases: XAPathFinderContainer

A class for interacting with disks in Path Finder.

New in version 0.3.0.

Attributes:

capacity

ejectable

free_space

local_volume

startup

property capacity: int
property ejectable: bool
property free_space: int
property local_volume: bool
property startup: bool
class PyXA.apps.PathFinder.XAPathFinderDiskList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderContainerList

A wrapper around lists of Path Finder disks that employs fast enumeration techniques.

All properties of disks can be called as methods on the wrapped list, returning a list containing each disk’s value for the property.

New in version 0.3.0.

Methods:

by_capacity(capacity)

by_ejectable(ejectable)

by_free_space(free_space)

by_local_volume(local_volume)

by_startup(startup)

capacity()

ejectable()

free_space()

local_volume()

startup()

by_capacity(capacity: int) XAPathFinderDisk | None[source]
by_ejectable(ejectable: bool) XAPathFinderDisk | None[source]
by_free_space(free_space: int) XAPathFinderDisk | None[source]
by_local_volume(local_volume: bool) XAPathFinderDisk | None[source]
by_startup(startup: bool) XAPathFinderDisk | None[source]
capacity() list[int][source]
ejectable() list[bool][source]
free_space() list[int][source]
local_volume() list[bool][source]
startup() list[bool][source]
class PyXA.apps.PathFinder.XAPathFinderDocument(properties)[source]

Bases: XAObject

A class for interacting with documents in Path Finder.

New in version 0.3.0.

Attributes:

file

modified

name

property file: XAPath
property modified: bool
property name: str
class PyXA.apps.PathFinder.XAPathFinderDocumentList(properties: dict, filter: dict | None = None)[source]

Bases: XAList

A wrapper around lists of Path Finder documents that employs fast enumeration techniques.

All properties of documents can be called as methods on the wrapped list, returning a list containing each document’s value for the property.

New in version 0.3.0.

Methods:

by_file(file)

by_modified(modified)

by_name(name)

file()

modified()

name()

by_file(file: str | XAPath) XAPathFinderDocument | None[source]
by_modified(modified: bool) XAPathFinderDocument | None[source]
by_name(name: str) XAPathFinderDocument | None[source]
file() list[XABase.XAPath][source]
modified() list[bool][source]
name() list[str][source]
class PyXA.apps.PathFinder.XAPathFinderFile(properties)[source]

Bases: XAPathFinderItem

A class for interacting with files in Path Finder.

New in version 0.3.0.

Attributes:

creator_type

file_type

property creator_type: str
property file_type: str
class PyXA.apps.PathFinder.XAPathFinderFileList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderItemList

A wrapper around lists of Path Finder files that employs fast enumeration techniques.

All properties of files can be called as methods on the wrapped list, returning a list containing each file’s value for the property.

New in version 0.3.0.

Methods:

by_creator_type(creator_type)

by_file_type(file_type)

creator_type()

file_type()

by_creator_type(creator_type: str) XAPathFinderFile | None[source]
by_file_type(file_type: str) XAPathFinderFile | None[source]
creator_type() list[str][source]
file_type() list[str][source]
class PyXA.apps.PathFinder.XAPathFinderFinderWindow(properties)[source]

Bases: XAPathFinderWindow

A class for interacting with finder windows in Path Finder.

New in version 0.3.0.

Attributes:

current_view

The current view.

target

The active target.

Methods:

open()

Opens the window.

property current_view: str

The current view.

open() None[source]

Opens the window.

property target: XAPathFinderContainer

The active target.

class PyXA.apps.PathFinder.XAPathFinderFinderWindowList(properties: dict, filter: dict | None = None)[source]

Bases: XASBWindowList

A wrapper around lists of Path Finder finder windows that employs fast enumeration techniques.

All properties of windows can be called as methods on the wrapped list, returning a list containing each window’s value for the property.

New in version 0.3.0.

Methods:

by_current_view(current_view)

by_target(target)

current_view()

The current view.

target()

The active target.

by_current_view(current_view: str) XAPathFinderFinderWindow | None[source]
by_target(target: XAPathFinderContainer) XAPathFinderFinderWindow | None[source]
current_view() list[str][source]

The current view.

target() XAPathFinderContainerList[source]

The active target.

class PyXA.apps.PathFinder.XAPathFinderFolder(properties)[source]

Bases: XAPathFinderContainer

A class for interacting with Path Finder folders and their contents.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderFolderList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderContainerList

A wrapper around lists of Path Finder folders that employs fast enumeration techniques.

All properties of folders can be called as methods on the wrapped list, returning a list containing each folder’s value for the property.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderInfoWindow(properties)[source]

Bases: XAPathFinderWindow

A class for interacting with info windows in Path Finder.

New in version 0.3.0.

Attributes:

item

The active item.

property item: XAPathFinderItem

The active item.

class PyXA.apps.PathFinder.XAPathFinderInfoWindowList(properties: dict, filter: dict | None = None)[source]

Bases: XASBWindowList

A wrapper around lists of Path Finder info windows that employs fast enumeration techniques.

All properties of windows can be called as methods on the wrapped list, returning a list containing each window’s value for the property.

New in version 0.3.0.

Methods:

by_item(item)

item()

The active item.

by_item(item: XAPathFinderItem) XAPathFinderInfoWindow | None[source]
item() XAPathFinderItemList[source]

The active item.

class PyXA.apps.PathFinder.XAPathFinderItem(properties)[source]

Bases: XAObject

A class for interacting with items in Path Finder.

New in version 0.3.0.

Attributes:

container

creation_date

disk

displayed_name

everyones_privileges

extension_hidden

group

group_privileges

information_window

kind

label_index

locked

modification_date

name

name_extension

owner

owner_privileges

path

physical_size

posix_path

size

url

Methods:

delete()

Deletes the item.

eject()

Ejects the item.

exists()

Returns whether the item exists.

open([application])

Opens the item.

reveal()

Reveals the item in Path Finder.

select()

Selects the item in Path Finder.

show_info()

Opens the item's info window.

property container: XAPathFinderContainer
property creation_date: datetime
delete() None[source]

Deletes the item.

property disk: XAPathFinderDisk
property displayed_name: str
eject() None[source]

Ejects the item.

property everyones_privileges: str
exists() bool[source]

Returns whether the item exists.

property extension_hidden: bool
property group: str
property group_privileges: str
property information_window: XAPathFinderInfoWindow
property kind: str
property label_index: int
property locked: bool
property modification_date: datetime
property name: str
property name_extension: str
open(application: str | XAApplication = 'Path Finder') None[source]

Opens the item.

property owner: str
property owner_privileges: str
property path: XAPath
property physical_size: int
property posix_path: XAPath
reveal() None[source]

Reveals the item in Path Finder.

select() None[source]

Selects the item in Path Finder.

show_info() None[source]

Opens the item’s info window.

property size: int
property url: XAURL
class PyXA.apps.PathFinder.XAPathFinderItemList(properties: dict, filter: dict | None = None, obj_class=None)[source]

Bases: XAList

A wrapper around lists of Path Finder items that employs fast enumeration techniques.

All properties of items can be called as methods on the wrapped list, returning a list containing each item’s value for the property.

New in version 0.3.0.

Methods:

by_name(name)

name()

by_name(name: str) XAPathFinderItem | None[source]
name() list[str][source]
class PyXA.apps.PathFinder.XAPathFinderLeftTarget(properties)[source]

Bases: XAPathFinderContainer

A class for interacting with left targets in Path Finder.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderLeftTargetList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderContainer

A wrapper around lists of Path Finder left targets that employs fast enumeration techniques.

All properties of left targets can be called as methods on the wrapped list, returning a list containing each left target’s value for the property.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderRightTarget(properties)[source]

Bases: XAPathFinderContainer

A class for interacting with right targets in Path Finder.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderRightTargetList(properties: dict, filter: dict | None = None)[source]

Bases: XAPathFinderContainer

A wrapper around lists of Path Finder right targets that employs fast enumeration techniques.

All properties of right targets can be called as methods on the wrapped list, returning a list containing each right target’s value for the property.

New in version 0.3.0.

class PyXA.apps.PathFinder.XAPathFinderWindow(properties: dict)[source]

Bases: XASBWindow

A window of Path Finder.app.

New in version 0.3.0.

Attributes:

document

The active document.

property document: XAPathFinderDocument

The active document.