smbjwrapper
smbjwrapper copied to clipboard
A modern object orientated library for Samba SMB
The method `SmbItem.isRootPath` returns true for the first subdirectory as directory path. A quick fix would be to check if the path is empty, but this won't work on DFS...
Provide a method `isWritable` to check if the file/directory path is writable or not.
Your method public SmbFile renameTo(String newFileName, boolean replaceIfExist) { try (File file = getDiskShare().openFile(getPath(), EnumSet.of(AccessMask.GENERIC_ALL), null, SMB2ShareAccess.ALL, SMB2CreateDisposition.FILE_OPEN, null)) { String newFilePath = buildProperItemPath(getParentPath().getPath(), newFileName); file.rename(newFilePath, replaceIfExist); return new SmbFile(getSmbConnection(),...