public class NativeSshFileNio extends NativeSshFile
SshFile.Attribute, SshFile.Permission
file, fileName, LOG, nativeFileSystemView, userName
Constructor and Description |
---|
NativeSshFileNio(NativeFileSystemView nativeFileSystemView,
String fileName,
File file,
String userName)
Constructor, internal do not use directly.
|
Modifier and Type | Method and Description |
---|---|
OutputStream |
createOutputStream(long offset)
Create output stream for writing.
|
void |
createSymbolicLink(SshFile destination) |
boolean |
doesExist()
Does this file exists?
|
Map<SshFile.Attribute,Object> |
getAttributes(boolean followLinks) |
String |
readSymbolicLink() |
void |
setAttributes(Map<SshFile.Attribute,Object> attributes) |
create, createInputStream, delete, equals, getAbsolutePath, getAttribute, getLastModified, getName, getNativeFile, getOwner, getParentFile, getPhysicalFile, getPhysicalName, getSize, handleClose, handleUnsupportedAttributes, isDirectory, isExecutable, isFile, isReadable, isRemovable, isWritable, listSshFiles, mkdir, move, normalizeSeparateChar, setAttribute, setLastModified, toString, truncate
public NativeSshFileNio(NativeFileSystemView nativeFileSystemView, String fileName, File file, String userName)
nativeFileSystemView
- public boolean doesExist()
NativeSshFile
doesExist
in interface SshFile
doesExist
in class NativeSshFile
SshFile
existspublic Map<SshFile.Attribute,Object> getAttributes(boolean followLinks) throws IOException
getAttributes
in interface SshFile
getAttributes
in class NativeSshFile
IOException
public void setAttributes(Map<SshFile.Attribute,Object> attributes) throws IOException
setAttributes
in interface SshFile
setAttributes
in class NativeSshFile
IOException
public String readSymbolicLink() throws IOException
readSymbolicLink
in interface SshFile
readSymbolicLink
in class NativeSshFile
IOException
public void createSymbolicLink(SshFile destination) throws IOException
createSymbolicLink
in interface SshFile
createSymbolicLink
in class NativeSshFile
IOException
public OutputStream createOutputStream(long offset) throws IOException
NativeSshFile
createOutputStream
in interface SshFile
createOutputStream
in class NativeSshFile
offset
- The number of bytes at where to start writing.
If the file is not random accessible,
any offset other than zero will throw an exception.OutputStream
used to write to the SshFile
IOException
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.