Function (in 2024a) to separate implicit directory parts from a folder string?

1 view (last 30 days)
In MATLAB versions from 2014 to 2023b there was an internal utility function called matlab.internal.language.introspective.separateImplicitDirs
Its job was to identify portions of a folder structure that were implicit (like +packageName on the end of myFolder/+packageName).
That function no longer exists in 2024a. This is possibly due to the change in nomenclature from packages to namespaces. Does anyone know a replacement function? I could of course just copy the function from 2023b (it is just a set of regexp tasks) but pointing to the inbuilt version would be nice.
Thanks,
Sven

Accepted Answer

Sourabh
Sourabh on 11 Jun 2024
Hey Sven,
It looks like this function has been moved and is now called 'matlab.lang.internal.introspective.separateImplicitDirs'.
Is there any particular reason you want to use the inbuilt version? It would be best to write your own function considering that these functions are meant for internal use only and MathWorks could change the function in future releases which could break your code.
Hope this helps!
  1 Comment
Sven
Sven on 11 Jun 2024
Thanks!
Yes, the main reason is just to keep up with potential changes - I'd prefer to use an internal (but "correct" for every release) function that will error loudly when it changes (like now in 2024a) than to retain my own copy of a function from an earlier release and then have it fail silently (i.e., run but run incorrectly) if some syntax changes that my function isn't aware of like a new type of internal folder designation.

Sign in to comment.

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!