- 😄 Nick: Jinbeen
- 🔭 Focus on Android / iOS
- 💬 https://youlookwhat.github.io
- 📫 掘金、CSDN、简书
youlookwhat / bysmb Goto Github PK
View Code? Open in Web Editor NEWAndroid 通过SMB (Server Message Block),实现手机给电脑传输数据
License: Apache License 2.0
Android 通过SMB (Server Message Block),实现手机给电脑传输数据
License: Apache License 2.0
这里提几个遇到的点:
1.作者对外开放的方法只能通过读取本地的文件流 , 然后再通过smb写入pc端 . 对于我的场景 , 是直接能拿到写入的字符串内容 , 不需要读取本地文件流再写入pc端 .
2.对于共享文件夹名的支持不友好 , 假如是"ShareFile"为共享文件名是可以的 , 但是"ShareFile/K1"这样带有斜杠的就直接报错 . 看了源码 , SmbPath类的另外一个构造方法是有path字段的 , 但是并没有对外开放.
val bySmb = BySMB.with().setConfig(ip, // ip computerSharingUserName, // 用户名 computerSharingPassword, // 密码 printPath // 共享文件夹名 ).setReadTimeOut(60).setSoTimeOut(180).build()
以上只是提出我的使用场景遇到的问题 , 还是感谢作者开放源码 , 可以省了不少事 .
smb.listFile(object : OnReadFileListNameCallback {
override fun onFailure(message: String) {
}
override fun onSuccess(fileNameList: List<String>) {
files = fileNameList
for (i in fileNameList) {
Log.v("xxx", i)
}
}
})
类型是string,怎么知道文件类型,比如zip, txt, 文件夹,jpg等
Sent from PPHub
Dear Sir
this can run at WSA ?
let WSA <--> MAC/Win/LINUX sync file ?
like this AvinashReddy3108/rclone-mount-magisk#4
THX
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.