bdcs-0.2.0: Tools for managing a content store of software packages

Copyright(c) 2017 Red Hat Inc.
LicenseLGPL
Maintainerhttps://github.com/weldr
Stabilityalpha
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

BDCS.Import.URI

Description

Utilities for manipulating URIs during import.

Synopsis

Documentation

appendURI :: URI -> String -> Maybe URI Source #

Append a path to a URI.

baseURI :: URI -> Maybe URI Source #

Go up one directory in the URI. For instance: > ghci> let uri = parseURI "file://pathtoreporepodata/primary.xml" > ghci> baseURI (fromJust uri) > Just file://pathtorepo

isCompsFile :: URI -> Bool Source #

Does a URI point to a comps.xml file? This is only really useful when importing RPMs from a comps file, as shipped by RPM-based distributions.

isPrimaryXMLFile :: URI -> Bool Source #

Does a URI point to a primary.xml file? This is only really useful when importing RPMs from a repo in an RPM-based distribution.

showURI :: URI -> String Source #

Convert a URI to string with no obfuscation

uriToPath :: URI -> FilePath Source #

Convert a file:// URI to a FilePath. This does not check that the URI is a file:// URI, assumes posix-style paths