PapcoDoc/devguide/filesystems

From PapcoWiki

Jump to: navigation, search

Contents

Audience

PaPCo developers familiar with IDL objects.

Introduction

PaPCo uses abstracted filesystems to provide clean, uniform access to resources available remotely via HTTP and FTP. An abstracted filesystem hides the details of how remote folders are listed and files downloaded. Local folder, HTTP websites and FTP sites can be utilized using the same function calls.

API

The interface to FileSystem objects is defined in papco_lib/filesystem/papco_filesystem.pro

papco_filesystem::list(dir)

returns a string array of the items in the folder. Items in the result that are folders are indicated with a trailing slash (/).

papco_filesystem::reset

reset the cache of listed directories and downloaded items.

Web-based FileSystems

Web-based filesystems provide additional methods for downloading data.

papco_web_filesystem::copyFileTo( file, localFS )

copies the file to a local mirror of the filesystem.

ls-lLR files

If the file "ls-lLR" or "ls-lLR.gz" is found in the root of the filesystem, then this file is downloaded and parsed to provide a listings of the remote filesystem. This can dramatically improve performance as the number of transactions between the client and host is reduced.