Search in sources :

Example 1 with SMB2ShareAccess

use of com.hierynomus.mssmb2.SMB2ShareAccess in project iaf by ibissource.

the class Samba2FileSystem method getFolder.

private Directory getFolder(String filename, AccessMask accessMask, SMB2CreateDisposition createDisposition) {
    Set<SMB2ShareAccess> shareAccess = new HashSet<SMB2ShareAccess>();
    shareAccess.addAll(SMB2ShareAccess.ALL);
    Set<AccessMask> accessMaskSet = new HashSet<AccessMask>();
    accessMaskSet.add(accessMask);
    Directory file;
    file = diskShare.openDirectory(filename, accessMaskSet, null, shareAccess, createDisposition, null);
    return file;
}
Also used : SMB2ShareAccess(com.hierynomus.mssmb2.SMB2ShareAccess) AccessMask(com.hierynomus.msdtyp.AccessMask) HashSet(java.util.HashSet) Directory(com.hierynomus.smbj.share.Directory)

Example 2 with SMB2ShareAccess

use of com.hierynomus.mssmb2.SMB2ShareAccess in project iaf by ibissource.

the class Samba2FileSystemTestHelper method getFile.

private File getFile(String filename, AccessMask accessMask, SMB2CreateDisposition createDisposition) {
    Set<SMB2ShareAccess> shareAccess = new HashSet<SMB2ShareAccess>();
    shareAccess.addAll(SMB2ShareAccess.ALL);
    Set<SMB2CreateOptions> createOptions = new HashSet<SMB2CreateOptions>();
    createOptions.add(SMB2CreateOptions.FILE_WRITE_THROUGH);
    Set<AccessMask> accessMaskSet = new HashSet<AccessMask>();
    accessMaskSet.add(accessMask);
    File file;
    file = diskShare.openFile(filename, accessMaskSet, null, shareAccess, createDisposition, createOptions);
    return file;
}
Also used : SMB2CreateOptions(com.hierynomus.mssmb2.SMB2CreateOptions) SMB2ShareAccess(com.hierynomus.mssmb2.SMB2ShareAccess) AccessMask(com.hierynomus.msdtyp.AccessMask) File(com.hierynomus.smbj.share.File) HashSet(java.util.HashSet)

Example 3 with SMB2ShareAccess

use of com.hierynomus.mssmb2.SMB2ShareAccess in project iaf by ibissource.

the class Samba2FileSystem method getFile.

private File getFile(String filename, AccessMask accessMask, SMB2CreateDisposition createDisposition) {
    Set<SMB2ShareAccess> shareAccess = new HashSet<SMB2ShareAccess>();
    shareAccess.addAll(SMB2ShareAccess.ALL);
    Set<SMB2CreateOptions> createOptions = new HashSet<SMB2CreateOptions>();
    createOptions.add(SMB2CreateOptions.FILE_WRITE_THROUGH);
    Set<AccessMask> accessMaskSet = new HashSet<AccessMask>();
    accessMaskSet.add(accessMask);
    File file;
    file = diskShare.openFile(filename, accessMaskSet, null, shareAccess, createDisposition, createOptions);
    return file;
}
Also used : SMB2CreateOptions(com.hierynomus.mssmb2.SMB2CreateOptions) SMB2ShareAccess(com.hierynomus.mssmb2.SMB2ShareAccess) AccessMask(com.hierynomus.msdtyp.AccessMask) File(com.hierynomus.smbj.share.File) HashSet(java.util.HashSet)

Example 4 with SMB2ShareAccess

use of com.hierynomus.mssmb2.SMB2ShareAccess in project iaf by ibissource.

the class Samba2FileSystemTestHelper method getFolder.

private Directory getFolder(String filename, AccessMask accessMask, SMB2CreateDisposition createDisposition) {
    Set<SMB2ShareAccess> shareAccess = new HashSet<SMB2ShareAccess>();
    shareAccess.addAll(SMB2ShareAccess.ALL);
    Set<AccessMask> accessMaskSet = new HashSet<AccessMask>();
    accessMaskSet.add(accessMask);
    Directory file;
    file = diskShare.openDirectory(filename, accessMaskSet, null, shareAccess, createDisposition, null);
    return file;
}
Also used : SMB2ShareAccess(com.hierynomus.mssmb2.SMB2ShareAccess) AccessMask(com.hierynomus.msdtyp.AccessMask) HashSet(java.util.HashSet) Directory(com.hierynomus.smbj.share.Directory)

Aggregations

AccessMask (com.hierynomus.msdtyp.AccessMask)4 SMB2ShareAccess (com.hierynomus.mssmb2.SMB2ShareAccess)4 HashSet (java.util.HashSet)4 SMB2CreateOptions (com.hierynomus.mssmb2.SMB2CreateOptions)2 Directory (com.hierynomus.smbj.share.Directory)2 File (com.hierynomus.smbj.share.File)2