-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
你好,怎么知道获取的文件列表是类型? #6
Comments
这是文件路径,应该可以通过路径得到后缀名吧,通过 / 拆分,然后通过 . 截取后面的后缀名 |
开始想过这种方法,但是不行,比如一个文件它没有后缀名,但它不是文件夹,就不好整
|
一个文件它没有后缀名,这个要判断类型本来就不好处理,据我所知需要将文件下载到本地,然后再通过什么方式判断。 |
File类里面有个isDirectory()方法,就是有没有办法让它返回一个File类型的list |
你是说通过文件流得到文件类型:通过文件流获取文件类型 |
是的,就是这种,就是怎么拿到这个文件流 ^_^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
类型是string,怎么知道文件类型,比如zip, txt, 文件夹,jpg等
The text was updated successfully, but these errors were encountered: