public class CSDKFile extends Object implements csdk.v2.api.filesystem.IFile
| Constructor and Description |
|---|
CSDKFile(csbase.logic.ClientFile file)
Construtor
|
| Modifier and Type | Method and Description |
|---|---|
csdk.v2.api.filesystem.IFileLock |
acquireExclusiveLock(Window window) |
csdk.v2.api.filesystem.IFileLock |
acquireSharedLock(Window window) |
boolean |
canExecute() |
boolean |
canRead() |
boolean |
canWrite() |
void |
close()
Fecha o arquivo.
|
void |
close(boolean force) |
csdk.v2.api.filesystem.IFile |
copy(csdk.v2.api.filesystem.IFile newParent,
Window window) |
boolean |
delete(Window window) |
boolean |
exists() |
csdk.v2.api.filesystem.IFile |
getChild(String name,
Window window) |
csdk.v2.api.filesystem.IFile[] |
getChildren() |
csbase.logic.ClientFile |
getFile()
Obtém o arquivo encapsulado.
|
csdk.v2.api.filesystem.FileLocationType |
getFileLocationType() |
InputStream |
getInputStream() |
long |
getModificationDate() |
String |
getName() |
OutputStream |
getOutputStream() |
csdk.v2.api.filesystem.IFile |
getParent() |
String[] |
getPath() |
String |
getStringPath() |
String |
getType() |
boolean |
isDirectory() |
boolean |
isHidden() |
boolean |
move(csdk.v2.api.filesystem.IFile newParent,
Window window) |
void |
open(boolean readOnly) |
long |
position() |
void |
position(long newPosition) |
int |
read(byte[] dst,
int off,
int len,
long position) |
int |
read(byte[] dst,
long position) |
boolean |
rename(String newName,
Window window) |
long |
size() |
void |
write(byte[] src,
int off,
int len,
long position) |
void |
write(byte[] src,
long position) |
public CSDKFile(csbase.logic.ClientFile file)
file - arquivo encapsulado.public void close(boolean force)
throws IOException
close in interface csdk.v2.api.filesystem.IFileIOExceptionpublic void close()
throws IOException
IOException - em caso de erro de I/O.public csdk.v2.api.filesystem.IFile[] getChildren()
throws Exception
getChildren in interface csdk.v2.api.filesystem.IFileExceptionpublic InputStream getInputStream() throws IOException
getInputStream in interface csdk.v2.api.filesystem.IFileIOExceptionpublic long getModificationDate()
getModificationDate in interface csdk.v2.api.filesystem.IFilepublic String getName()
getName in interface csdk.v2.api.filesystem.IFilepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface csdk.v2.api.filesystem.IFileIOExceptionpublic String[] getPath()
getPath in interface csdk.v2.api.filesystem.IFilepublic String getStringPath()
getStringPath in interface csdk.v2.api.filesystem.IFilepublic String getType()
getType in interface csdk.v2.api.filesystem.IFilepublic boolean isDirectory()
isDirectory in interface csdk.v2.api.filesystem.IFilepublic void open(boolean readOnly)
throws Exception
open in interface csdk.v2.api.filesystem.IFileExceptionpublic long position()
throws IOException
position in interface csdk.v2.api.filesystem.IFileIOExceptionpublic void position(long newPosition)
throws IOException
position in interface csdk.v2.api.filesystem.IFileIOExceptionpublic int read(byte[] dst,
int off,
int len,
long position)
throws Exception
read in interface csdk.v2.api.filesystem.IFileExceptionpublic int read(byte[] dst,
long position)
throws Exception
read in interface csdk.v2.api.filesystem.IFileExceptionpublic long size()
size in interface csdk.v2.api.filesystem.IFilepublic void write(byte[] src,
int off,
int len,
long position)
throws IOException,
csdk.v2.api.filesystem.FileLockedException
write in interface csdk.v2.api.filesystem.IFileIOExceptioncsdk.v2.api.filesystem.FileLockedExceptionpublic void write(byte[] src,
long position)
throws IOException,
csdk.v2.api.filesystem.FileLockedException
write in interface csdk.v2.api.filesystem.IFileIOExceptioncsdk.v2.api.filesystem.FileLockedExceptionpublic csdk.v2.api.filesystem.FileLocationType getFileLocationType()
getFileLocationType in interface csdk.v2.api.filesystem.IFilepublic csbase.logic.ClientFile getFile()
public csdk.v2.api.filesystem.IFile getParent()
getParent in interface csdk.v2.api.filesystem.IFilepublic boolean exists()
throws IOException
exists in interface csdk.v2.api.filesystem.IFileIOExceptionpublic boolean canExecute()
canExecute in interface csdk.v2.api.filesystem.IFilepublic boolean canRead()
canRead in interface csdk.v2.api.filesystem.IFilepublic boolean canWrite()
canWrite in interface csdk.v2.api.filesystem.IFilepublic csdk.v2.api.filesystem.IFileLock acquireExclusiveLock(Window window) throws Exception
acquireExclusiveLock in interface csdk.v2.api.filesystem.IFileExceptionpublic csdk.v2.api.filesystem.IFileLock acquireSharedLock(Window window) throws Exception
acquireSharedLock in interface csdk.v2.api.filesystem.IFileExceptionpublic csdk.v2.api.filesystem.IFile getChild(String name, Window window) throws Exception
getChild in interface csdk.v2.api.filesystem.IFileExceptionpublic boolean isHidden()
isHidden in interface csdk.v2.api.filesystem.IFilepublic boolean rename(String newName, Window window) throws Exception
rename in interface csdk.v2.api.filesystem.IFileExceptionpublic boolean move(csdk.v2.api.filesystem.IFile newParent,
Window window)
throws Exception
move in interface csdk.v2.api.filesystem.IFileExceptionpublic boolean delete(Window window) throws Exception
delete in interface csdk.v2.api.filesystem.IFileExceptionCopyright © 2018. All rights reserved.