I have defined a function in a package to import some data files under a directory which is produced by a scanning device (LS55):
ls55ImportSPDirectory[dir_String?DirectoryQ, OptionsPattern[]] := doStuff[dir]
Now I want to integrate the functionality into the import framework, so that the name ls55ImportSPDirectory
won't be exposed. When I do
ImportExport`RegisterImport["LS55", ls55ImportSPDirectory]
and tried e.g. to
Import["C:\\Users\\rzhang\\work\\LS55\\", {"LS55", "Data"}]
I get this error:
(*Out: Import::nodirsup: Cannot import directory C:\Users\rzhang\work\LS55\ as LS55 *)
It seems the "Directory"
type has already been registered which clashes with my customized type "LS55".
Import.m
under$InstallationDirectory\SystemFiles\Formats\Directory
which i think registers directories to use the default importer, leaving no rooms for customization? $\endgroup$ – asterix314 Oct 6 '14 at 9:14