(self, file_path, pretty=True, toarchive=False)
Write metadata file or full archive containing metadata & dataset.

        Parameters
        ----------
        file_path : string
            Location to save.
        pretty : bool, default True
            When True will write more human-readable output, otherwise will be flat JSON.
        toarchive : bool, default False
            If True will write both dataset & metadata into SigMF archive format as a single `tar` file.
            If False will only write metadata to `sigmf-meta`.
Write metadata file or full archive containing metadata & dataset.
Write metadata file or full archive containing metadata & dataset .
def tofile(self, file_path, pretty=True, toarchive=False):
        '''
        Write metadata file or full archive containing metadata & dataset.

        Parameters
        ----------
        file_path : string
            Location to save.
        pretty : bool, default True
            When True will write more human-readable output, otherwise will be flat JSON.
        toarchive : bool, default False
            If True will write both dataset & metadata into SigMF archive format as a single `tar` file.
            If False will only write metadata to `sigmf-meta`.
        '''
        fns = get_sigmf_filenames(file_path)
        if toarchive:
            self.archive(fns['archive_fn'])
        else:
            with open(fns['meta_fn'], 'w') as fp:
                self.dump(fp, pretty=pretty)
def tofile ( self , file_path , pretty = True , toarchive = False ) : fns = get_sigmf_filenames ( file_path ) if toarchive : self . archive ( fns [ 'archive_fn' ] ) else : with open ( fns [ 'meta_fn' ] , 'w' ) as fp : self . dump ( fp , pretty = pretty )