Open alb-i986 opened 4 years ago
When you open a file, you can specify the set of SMB2ShareAccess values that defines what accesses other processes have when the file is already opened. Empty set means the current process has exclusive access. I think this is what you are looking for.
Yeah, I think so too. I was doing some research and I just found that. Thanks, I'll give it a try.
One thing: maybe a constant specifically with that purpose would help, rather than passing null, which is not good practice. Because I see that in the constructor of SMB2CreateRequest, if shareAccesses is null, it is set to EnumSet.noneOf
I was looking at JCIFS and they have the constant FILE_NO_SHARE
Here, since we have SMB2ShareAccess.ALL
, it would make sense to have an enum constant SMB2ShareAccess.NONE
.
Hi,
Quick question: do you support file locking by any chance? I tried to search in the repo for files named "lock" but I couldn't find any.
I need to read/write a file on a share and I need to handle concurrent accesses from different processes, so what I need I think is a file locking mechanism on the smb library side.
I'll appreciate any help, Thanks