\Header{loadFromUrl}{Functions to load files from a web site}
\alias{unzipFile}{loadFromUrl}
\alias{validateUrl}{loadFromUrl}
\keyword{manip}{loadFromUrl}
\begin{Description}\relax
Given an url, these functions download a file from a given web site
and unzip the file if it is compressed.\end{Description}
\begin{Usage}
\begin{verbatim}
loadFromUrl(srcUrl, destDir = "")
validateUrl(srcUrl)
unzipFile(fileName, where = file.path(.path.package("SAGElyzer"),
"data"), isgz = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{srcUrl}] \code{srcUrl} a character string for the url of the file
to be downloaded
\item[\code{destDir}] \code{destDir} a character string for a loacal
directory where the file to be downloaded will be saved
\item[\code{where}] \code{where} same as destDir
\item[\code{isgz}] \code{isga} a boolean indicating whether the downloaded
file is a gz file
\item[\code{fileName}] \code{fileName} a character string for the name of a
file
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
These functions are used by various objects in package pubRepo to
download data files from a web site. If the file is compressed,
decompressing will be applied and the path for the decompressed file
will be returned.

\code{\Link{validateUrl}} will terminate the process if an invalid url
is passed.

\code{\Link{unzipFile}} decompress the file passed as fileName.\end{Details}
\begin{Value}
\code{\Link{loadFromUrl}} returns a character string for the name of
the file saved locally.\end{Value}
\begin{Note}\relax
The functions are part of the Bioconductor project at Dana-Farber
Cancer Institute to provide Bioinformatics functionalities through R\end{Note}
\begin{Author}\relax
Jianhua Zhang\end{Author}
\begin{SeeAlso}\relax
\code{\Link{pubRepo-class}}\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# Get a dummy data file from Bioconductor web site
data <-
loadFromUrl("http://www.bioconductor.org/datafiles/wwwsources/Tll_tmpl.gz",
destDir = "")
unlink(data)
\end{ExampleCode}
\end{Examples}

