Skip to content

Commit 1ba9ca1

Browse files
committed
add docstring to ExportFile
1 parent 006cdcf commit 1ba9ca1

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

nipype/interfaces/io.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,6 +2878,27 @@ class ExportFileOutputSpec(TraitedSpec):
28782878

28792879

28802880
class ExportFile(SimpleInterface):
2881+
"""Copy in_file to out_file.
2882+
2883+
This interface copies an input file to a named output file.
2884+
This is useful to save files to a specified location
2885+
(as opposed to using DataSink).
2886+
2887+
Examples
2888+
--------
2889+
2890+
A trivial example that copies temporary_file.nii.gz
2891+
to sub1_out.nii.gz. (A more realistic example would set
2892+
in_file as the output of another Node.)
2893+
2894+
>>> from nipype.interfaces.io import ExportFile
2895+
>>> import os.path as op
2896+
>>> ef = Node(ExportFile(), "export")
2897+
>>> ef.inputs.in_file = "temporary_file.nii.gz"
2898+
>>> ef.inputs.out_file = op.abspath("output_folder/sub1_out.nii.gz")
2899+
>>> ef.run()
2900+
2901+
"""
28812902
input_spec = ExportFileInputSpec
28822903
output_spec = ExportFileOutputSpec
28832904

0 commit comments

Comments
 (0)