× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello Ricky,

Is there a API that validates that a IFS folder name is valid before you
create it?  For example /root///test would be invalid.

Actually, "/root///test" is a valid IFS folder name. It's equivalent to "/root/test", the extra slashes are ignored.

I don't think there's an API that will validate a folder name. Remember, the syntax of an illegal folder name would be different in each filesystem, and many of the filesystems in the IFS aren't actually on the iSeries, but are on a different machine that it connects to.

Not only that, but I can't actually think of a name that's not valid in the "root" and "QOpenSys" filesystem. I think pretty much every character except for "/" (which is still legal as a separator) and x'00' (which is the end of the string) is considered legal.

So, I think that the only way to really check if a folder can be created is to try it and find out. Obviously, you can check for errors on the mkdir() API and tell the user if it's illegal. But I'd expect errors like "you don't have authority" to be the reasons for failure, not the syntax of the name.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.