Ejemplo n.º 1
0
def getCollectedFileWriterForPath(dataPath):
    """Returns the class of a collected file writer suitable for the scheme used by `datapath`.

    The resulting class object must still be instantiated in order to get a usable instance of the class.

    Throws NotImplementedError if the requested scheme is explicitly not supported (e.g. "ftp://").
    Returns LocalFSCollectedFileWriter if scheme is absent or not recognized.
    """
    return getByScheme(dataPath, SCHEMAS_TO_COLLECTEDFILEWRITERS, LocalFSCollectedFileWriter)
Ejemplo n.º 2
0
def getFileWriterForPath(dataPath):
    """Returns the class of a file writer suitable for the scheme used by `datapath`.

    The resulting class object must still be instantiated in order to get a usable instance of the class.

    Throws NotImplementedError if the requested scheme is explicitly not supported (e.g. "ftp://").
    Returns LocalFSFileWriter if scheme is absent or not recognized.
    """
    return getByScheme(dataPath, SCHEMAS_TO_FILEWRITERS, LocalFSFileWriter)