If I have a file like /path/to/file/foo.txt, I want to get only .txt, how can I do it? Is there a related method?
If you look at Apache Commons IO, you'll find a class called FilenameUtils. If you use the getExtension method, You can obtain extensions. String ext = FilenameUtils.getExtension("/path/to/file/foo.txt");
String ext = FilenameUtils.getExtension("/path/to/file/foo.txt");
773 Uncaught (inpromise) Error on Electron: An object could not be cloned
983 /usr/bin/google-chrome:symbol lookup error:/usr/bin/google-chrome: undefined symbol:gbm_bo_get_modifier
614 PHP ssh2_scp_send fails to send files as intended
627 Scrap text information after the "View More" button when searching in the Yahoo! News search window
1061 In Java servlet, when SHA-256 sends WW-Authenticate header for digest authentication, the client does not return the result.
© 2025 OneMinuteCode. All rights reserved.