Comments for renameTo from the Android API reference for DocumentFile which is what the Native member of ExternalFile is
Renames this file to displayName.
Note that this method does not throw IOException on failure. Callers must check the return value.
Some providers may need to create a new document to reflect the rename, potentially with a different MIME type, so getUri and getType may change to reflect the rename.
When renaming a directory, children previously enumerated through listFiles may no longer be valid.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.