コード例 #1
0
ファイル: writers.py プロジェクト: MiguelPeralvo/thunder
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)
コード例 #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)