Skip to content

Commit adc8577

Browse files
committed
Document fileio_* version of functions
1 parent 38b2347 commit adc8577

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ Consequently, **packages should define "private" `load` and `save` methods (also
172172
`loadstreaming` and `savestreaming` if you implement them), and not extend
173173
(import) FileIO's**.
174174

175+
If you run into a naming conflict with the `load` and `save` functions
176+
(for example, you already have another function in your package that has
177+
one of these names), you can instead name your loaders `fileio_load`,
178+
`fileio_save` etc. Note that you cannot mix and match these styles: either
179+
all your loaders have to be named `load`, or all of them should be called
180+
`fileio_load`, but you cannot use both conventions in one module.
181+
175182
`load(::File)` and `save(::File)` should close any streams
176183
they open. (If you use the `do` syntax, this happens for you
177184
automatically even if the code inside the `do` scope throws an error.)

0 commit comments

Comments
 (0)