Package com.hierynomus.smbj.utils
Class SmbFiles
- java.lang.Object
-
- com.hierynomus.smbj.utils.SmbFiles
-
public class SmbFiles extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SmbFiles()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcopy(java.io.File source, DiskShare share, java.lang.String destPath, boolean overwrite)Copies local file to a destination path on the sharevoidmkdirs(DiskShare diskShare, SmbPath path)Create a set of nested sub-directories in the given path, for example, 2345 \ 3456 \ 4453 \ 123123.txtvoidmkdirs(DiskShare diskShare, java.lang.String path)Create a set of nested sub-directories in the given path, for example, 2345 \ 3456 \ 4453 \ 123123.txt
-
-
-
Method Detail
-
copy
public static int copy(java.io.File source, DiskShare share, java.lang.String destPath, boolean overwrite) throws java.io.IOExceptionCopies local file to a destination path on the share- Parameters:
share- the sharedestPath- the path to write tosource- the local Fileoverwrite- true/false to overwrite existing file- Returns:
- the actual number of bytes that was written to the file
- Throws:
java.io.FileNotFoundExceptionjava.io.IOException
-
mkdirs
public void mkdirs(DiskShare diskShare, java.lang.String path) throws SMBApiException
Create a set of nested sub-directories in the given path, for example, 2345 \ 3456 \ 4453 \ 123123.txt- Throws:
SMBApiException
-
mkdirs
public void mkdirs(DiskShare diskShare, SmbPath path) throws SMBApiException
Create a set of nested sub-directories in the given path, for example, 2345 \ 3456 \ 4453 \ 123123.txt- Throws:
SMBApiException
-
-