dctools.data.connection.connection_manager.FTPManager

class dctools.data.connection.connection_manager.FTPManager(connect_config, call_list_files=True, batch_size=64)

Manager for FTP connections.

Parameters:
__init__(connect_config, call_list_files=True, batch_size=64)
Parameters:

Methods

__init__(connect_config[, call_list_files, ...])

adjust_full_day(date_start, date_end)

Adjust date_end to cover a full day if dates are the same at midnight.

download_file(remote_path, local_path)

Download a file from the remote source to the local path.

estimate_resolution(ds, coord_system)

Estimate resolution from dataset based on coordinates.

extract_global_metadata()

Extract global metadata (common to all files) from a single file.

extract_metadata(path)

Extract metadata combining global/file-specific info.

extract_metadata_worker(path, ...[, argo_index])

Extract metadata combining global/file-specific info.

get_config_clean_copy()

Return a clean copy of the configuration.

get_global_metadata()

Get global metadata for all files in the connection manager.

list_files()

List available files on the FTP server matching the given pattern.

list_files_with_metadata()

Version with integrated Dask client and optimized configuration.

open(path[, mode])

Open a file, prioritizing local then remote access.

open_local(local_path)

Open a file locally if it exists.

open_remote(path[, mode])

Opens a remote file (not supported by FTP in this implementation).

set_global_metadata(global_metadata)

Sets the global metadata for the connection manager.

supports(path)

Checks if path is an FTP URL.

list_files()

List available files on the FTP server matching the given pattern.

Args:

Returns:

List of file paths matching the pattern.

Return type:

List[str]

open_remote(path, mode='rb')

Opens a remote file (not supported by FTP in this implementation).

classmethod supports(path)

Checks if path is an FTP URL.

Parameters:

path (str)

Return type:

bool