File Retrieving
Author(s): Christian Giménez.This module is responsible for loading the HTML or Pillow file and giving enough predicates to find and open, getting information and closing the file.
The most interesting predicate for you programmer, may be open_file/2.
Comments on the Implemetation Issues
A String Problem
There is a string problem, the atom2term module have problems when you want to transform a string with '/' at the beggining and in the middle. Predicates like string2term/2 give a bad results and I don't know why.So we split the URL into a list of folders using the '/' as separator, and then we transform them into terms. After that, we concat the atoms.
With the result of all this process, we have an URL as a term.
In other words:
- Split the string into a list of folder(and archive) names
- Transform each string(folder names) of the list into an term
- Concatenate each term into a complete URL again
- that's it!
Using the File
Functions for opening and manipulating the file.Usage and interface
- Library usage:
:- use_module(library(pc_file)). - Exports:
- Predicates:
open_file/3, is_pillow_file_a/1.
- Predicates:
- Other modules used:
- Application modules:
pc_file_finder, pc_pillow_interpreter. - System library modules:
file_utils, terms. - Internal (engine) modules:
term_basic, arithmetic, atomic_basic, attributes, basic_props, basiccontrol, data_facts, exceptions, io_aux, io_basic, prolog_flags, streams_basic, system_info, term_compare, term_typing, hiord_rt, debugger_support.
- Application modules:
Documentation on exports
PREDICATE
PREDICATE
Usage: is_pillow_file_a(+File)
- Description: t iff File has a Pillow extension(.pl).