Rev 6461 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{parse.dcf}\alias{parse.dcf}\title{Parse Debian Control File Format}\description{Parses text read from a file in debian control file format, e.g., theDESCRIPTION or CONTENTS of a package.}\usage{parse.dcf(desc=NULL, file="", fields=NULL, versionfix=FALSE)}\arguments{\item{text}{A character vector containing one line of the file in eachelement.}\item{file}{Name of the file to be parsed.}\item{fields}{A character vector of fields to return (if other fieldsoccur in the file they are ignored.}\item{versionfix}{Logical, if \code{TRUE} than the version field istruncated at the first whitespace character.}}\value{If \code{fields=NULL}, a list with one element per entry isreturned. Each entry is a list of character vectors, one per field.If \code{fields} are specified, then a character matrix with one rowper entry and one column per field is returned.}\seealso{\code{\link{package.contents}}, \code{\link{library}}}\examples{file <- system.file("CONTENTS", pkg="mva")parse.dcf(file=file)## same in 2 stepsfilecontent <- scan(file=file, what="", sep="\n")parse.dcf(text=filecontent)\keyword{utilities}