public class Samba1FileSystem extends FileSystemBase<jcifs.smb.SmbFile> implements IWritableFileSystem<jcifs.smb.SmbFile>
log
Constructor and Description |
---|
Samba1FileSystem() |
Modifier and Type | Method and Description |
---|---|
OutputStream |
appendFile(jcifs.smb.SmbFile f) |
void |
configure() |
jcifs.smb.SmbFile |
copyFile(jcifs.smb.SmbFile f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Copies the file to a another folder.
|
OutputStream |
createFile(jcifs.smb.SmbFile f) |
void |
createFolder(String folder) |
void |
deleteFile(jcifs.smb.SmbFile f) |
boolean |
exists(jcifs.smb.SmbFile f) |
boolean |
folderExists(String folder) |
Map<String,Object> |
getAdditionalFileProperties(jcifs.smb.SmbFile file) |
String |
getCanonicalName(jcifs.smb.SmbFile f) |
long |
getFileSize(jcifs.smb.SmbFile f) |
Date |
getModificationTime(jcifs.smb.SmbFile f) |
String |
getName(jcifs.smb.SmbFile f)
Get a string representation of an identification of a file.
|
String |
getParentFolder(jcifs.smb.SmbFile f) |
String |
getPhysicalDestinationName() |
boolean |
isFolder(jcifs.smb.SmbFile f) |
DirectoryStream<jcifs.smb.SmbFile> |
listFiles(String folder)
Lists all files in 'folder' or in the 'root' of the filesystem (when folder is null).
|
jcifs.smb.SmbFile |
moveFile(jcifs.smb.SmbFile f,
String destinationFolder,
boolean createFolder,
boolean resultantMustBeReturned)
Moves the file to a another folder.
|
void |
open() |
Message |
readFile(jcifs.smb.SmbFile f,
String charset) |
void |
removeFolder(String folder,
boolean removeNonEmptyFolder) |
jcifs.smb.SmbFile |
renameFile(jcifs.smb.SmbFile source,
jcifs.smb.SmbFile destination)
Renames the file to a new name, possibly in a another folder.
|
void |
setAuthAlias(String authAlias)
alias used to obtain credentials for the smb share
|
void |
setAuthenticationDomain(String domain)
domain, in case the user account is bound to a domain
|
void |
setDomain(String domain)
Deprecated.
|
void |
setForce(boolean force)
when
true , intermediate directories are created also |
void |
setListHiddenFiles(boolean listHiddenFiles)
controls whether hidden files are seen or not
|
void |
setPassword(String password)
the smb share password
|
void |
setShare(String share)
the destination, aka smb://xxx/yyy share
|
void |
setUsername(String username)
the smb share username
|
jcifs.smb.SmbFile |
toFile(String filename)
Get a file 'F' representation of an identification of a file.
|
jcifs.smb.SmbFile |
toFile(String folder,
String filename)
Creates a reference to a file.
|
close, getMaxNumberOfMessagesToList, getNumberOfFilesInFolder, isOpen, setMaxNumberOfMessagesToList
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, getNumberOfFilesInFolder, isOpen
getDomain
public void configure() throws ConfigurationException
configure
in interface IBasicFileSystem<jcifs.smb.SmbFile>
ConfigurationException
public void open() throws FileSystemException
open
in interface IBasicFileSystem<jcifs.smb.SmbFile>
open
in class FileSystemBase<jcifs.smb.SmbFile>
FileSystemException
public jcifs.smb.SmbFile toFile(String filename) throws FileSystemException
IBasicFileSystem
IBasicFileSystem.getName(Object)
.toFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public jcifs.smb.SmbFile toFile(String folder, String filename) throws FileSystemException
IBasicFileSystem
toFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public DirectoryStream<jcifs.smb.SmbFile> listFiles(String folder) throws FileSystemException
IBasicFileSystem
listFiles
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public boolean exists(jcifs.smb.SmbFile f) throws FileSystemException
exists
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public OutputStream createFile(jcifs.smb.SmbFile f) throws FileSystemException
createFile
in interface IWritableFileSystem<jcifs.smb.SmbFile>
FileSystemException
public OutputStream appendFile(jcifs.smb.SmbFile f) throws FileSystemException
appendFile
in interface IWritableFileSystem<jcifs.smb.SmbFile>
FileSystemException
public Message readFile(jcifs.smb.SmbFile f, String charset) throws IOException, FileSystemException
readFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
IOException
FileSystemException
public void deleteFile(jcifs.smb.SmbFile f) throws FileSystemException
deleteFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public boolean isFolder(jcifs.smb.SmbFile f) throws FileSystemException
FileSystemException
public boolean folderExists(String folder) throws FileSystemException
folderExists
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public void createFolder(String folder) throws FileSystemException
createFolder
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public void removeFolder(String folder, boolean removeNonEmptyFolder) throws FileSystemException
removeFolder
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public jcifs.smb.SmbFile renameFile(jcifs.smb.SmbFile source, jcifs.smb.SmbFile destination) throws FileSystemException
IWritableFileSystem
renameFile
in interface IWritableFileSystem<jcifs.smb.SmbFile>
FileSystemException
public jcifs.smb.SmbFile moveFile(jcifs.smb.SmbFile f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is moved;resultantMustBeReturned
is not set, then a null result returned might also mean the file was moved successfully, but with unknown destination;moveFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
resultantMustBeReturned
- TODOFileSystemException
public jcifs.smb.SmbFile copyFile(jcifs.smb.SmbFile f, String destinationFolder, boolean createFolder, boolean resultantMustBeReturned) throws FileSystemException
IBasicFileSystem
resultantMustBeReturned
is set, then an Exception must be thrown, preferably before the file is copied;resultantMustBeReturned
is not set, then a null result returned might also mean the file was copied successfully, but with unknown destination;copyFile
in interface IBasicFileSystem<jcifs.smb.SmbFile>
resultantMustBeReturned
- TODOFileSystemException
public String getPhysicalDestinationName()
getPhysicalDestinationName
in interface HasPhysicalDestination
public long getFileSize(jcifs.smb.SmbFile f) throws FileSystemException
getFileSize
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public String getName(jcifs.smb.SmbFile f)
IBasicFileSystem
IBasicFileSystem.toFile(String)
.
Can reflect name a file has in its folder, is not expected to be unique over folders.getName
in interface IBasicFileSystem<jcifs.smb.SmbFile>
public String getParentFolder(jcifs.smb.SmbFile f) throws FileSystemException
getParentFolder
in interface IBasicFileSystem<jcifs.smb.SmbFile>
FileSystemException
public String getCanonicalName(jcifs.smb.SmbFile f)
getCanonicalName
in interface IBasicFileSystem<jcifs.smb.SmbFile>
public Date getModificationTime(jcifs.smb.SmbFile f)
getModificationTime
in interface IBasicFileSystem<jcifs.smb.SmbFile>
public Map<String,Object> getAdditionalFileProperties(jcifs.smb.SmbFile file)
getAdditionalFileProperties
in interface IBasicFileSystem<jcifs.smb.SmbFile>
public void setShare(String share)
public void setUsername(String username)
public void setPassword(String password)
public void setAuthAlias(String authAlias)
public void setAuthenticationDomain(String domain)
@Deprecated @ConfigurationWarning(value="Please use attribute authenticationDomain instead") public void setDomain(String domain)
public void setForce(boolean force)
true
, intermediate directories are created alsopublic void setListHiddenFiles(boolean listHiddenFiles)
Copyright © 2023 Frank!Framework. All rights reserved.