Pinto::Role::FileFetcher(3pm)

Pinto::Role::FileFetcher3pm

Something that fetches remote files

Version

version 0.097

Methods

fetch(from => 'http://someplace' to => 'some/path')

Fetches the file located at "from" to the file located at "to", if the file at "from" is newer than the file at "to". If the intervening directories do not exist, they will be created for you. Returns a true value if the file has changed, returns false if it has not changed. Throws and exception if anything goes wrong.

The "from" argument can be either a URI or Path::Class::File object, or a string that represents either of those. The "to" attribute can be a Path::Class::File object or a string that represents one.

fetch_temporary(url => 'http://someplace')

Fetches the file located at the "url" to a file in a temporary directory. The file will have the same basename as the "url". Returns a Path::Class::File that points to the new file. Throws and exception if anything goes wrong. Note the temporary directory and all its contents will be deleted when the process terminates.

Releases

3 releases since Debian 8 (Jessie); the text changed 2 times.

  1. 8
  2. 9
  3. 10

Author

Jeffrey Ryan Thalhammer <[email protected]>

From pinto 0.97+dfsg-5 in Debian 10 (Buster). Parsed by carta from the page's man source.