/** * Get information for a given path **/ public <F extends FileSettableInformation> void setFileInformation(String path, F information) throws SMBApiException { try (DiskEntry e = open(path, of(FILE_WRITE_ATTRIBUTES, FILE_WRITE_EA), null, ALL, FILE_OPEN, null)) { e.setFileInformation(information); } }
/** * Get information for a given path **/ public <F extends FileSettableInformation> void setFileInformation(String path, F information) throws SMBApiException { try (DiskEntry e = open(path, of(FILE_WRITE_ATTRIBUTES, FILE_WRITE_EA), null, ALL, FILE_OPEN, null)) { e.setFileInformation(information); } }
/** * Creates hard link for receiver. * * @param linkname the path to the hard link relative to share * @param replaceIfExist if true replaces existing entry. * * @throws SMBApiException */ public void createHardlink(final String linkname, final boolean replaceIfExist) throws SMBApiException { final FileLinkInformation linkInfo = new FileLinkInformation(replaceIfExist, linkname); this.setFileInformation(linkInfo); }
public void rename(String newName, boolean replaceIfExist, long rootDirectory) throws SMBApiException { FileRenameInformation renameInfo = new FileRenameInformation(replaceIfExist, rootDirectory, newName); this.setFileInformation(renameInfo); }
/** * Creates hard link for receiver. * * @param linkname the path to the hard link relative to share * @param replaceIfExist if true replaces existing entry. * * @throws SMBApiException */ public void createHardlink(final String linkname, final boolean replaceIfExist) throws SMBApiException { final FileLinkInformation linkInfo = new FileLinkInformation(replaceIfExist, linkname); this.setFileInformation(linkInfo); }
public void rename(String newName, boolean replaceIfExist, long rootDirectory) throws SMBApiException { FileRenameInformation renameInfo = new FileRenameInformation(replaceIfExist, rootDirectory, newName); this.setFileInformation(renameInfo); }