plugins.wfx
Class Win32FindData

java.lang.Object
  extended by plugins.wfx.Win32FindData

public class Win32FindData
extends java.lang.Object

This class contains all file informations about one file system entry.

Author:
Ken

Field Summary
static long ERROR_NO_MORE_FILES
          error code for setLastError(): empty directory detected.
static long ERROR_SUCCESS
          error code for setLastError(): no error detected.
static long FILE_ATTRIBUTE_ARCHIVE
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_COMPRESSED
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_DEVICE
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_DIRECTORY
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_ENCRYPTED
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_HIDDEN
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_NORMAL
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_OFFLINE
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_READONLY
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_REPARSE_POINT
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_SPARSE_FILE
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_SYSTEM
          file attribute of dwFileAttributes.
static long FILE_ATTRIBUTE_TEMPORARY
          file attribute of dwFileAttributes.
 
Constructor Summary
Win32FindData()
           
 
Method Summary
 java.lang.String getAlternateFileName()
          Get DOS-style file name (optional), set empty if unused.
 FileTime getCreationTime()
          Get Set Currently unused.
 long getFileAttributes()
          Get File attributes.
 java.lang.String getFileName()
          Get Local file name relative to the directory (without the path).
 long getFileSizeHigh()
          Get High word of file size.
 long getFileSizeLow()
          Get Low word of file size.
 FileTime getLastAccessTime()
          Get Currently unused.
 long getLastErrorMessage()
          Get error code: Currently supported: ERROR_NO_MORE_FILES, ERROR_SUCCESS (default).
 FileTime getLastWriteTime()
          Get Time stamp shown in the Total Commander file list, and copied with files.
 long getReserved0()
          Get On Unix systems, you can | (or) the dwFileAttributes field with 0x80000000 and set the dwReserved0 parameter to the Unix file mode (permissions).
 long getReserved1()
          Get Unused, must be set to 0.
 void setAlternateFileName(java.lang.String alternateFileName)
          Set DOS-style file name (optional), set empty if unused.
 void setCreationTime(FileTime creationTime)
          Set Currently unused.
 void setFileAttributes(long fileAttributes)
          Set File attributes.
 void setFileName(java.lang.String fileName)
          Set Local file name relative to the directory (without the path).
 void setFileSizeHigh(long fileSizeHigh)
          Set High word of file size.
 void setFileSizeLow(long fileSizeLow)
          Set Low word of file size.
 void setFromFile(java.io.File file)
          Set Win32 find data.
 void setLastAccessTime(FileTime lastAccessTime)
          Set Currently unused.
 void setLastErrorMessage(long errorCode)
          Set error code: Currently supported: ERROR_NO_MORE_FILES, ERROR_SUCCESS (default).
 void setLastWriteTime(FileTime lastWriteTime)
          Set Time stamp shown in the Total Commander file list, and copied with files.
 void setReserved0(long reserved0)
          Set On Unix systems, you can | (or) the dwFileAttributes field with 0x80000000 and set the dwReserved0 parameter to the Unix file mode (permissions).
 void setReserved1(long reserved1)
          Set Unused, must be set to 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_SUCCESS

public static final long ERROR_SUCCESS
error code for setLastError(): no error detected.

See Also:
Constant Field Values

ERROR_NO_MORE_FILES

public static final long ERROR_NO_MORE_FILES
error code for setLastError(): empty directory detected.

See Also:
Constant Field Values

FILE_ATTRIBUTE_READONLY

public static final long FILE_ATTRIBUTE_READONLY
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_HIDDEN

public static final long FILE_ATTRIBUTE_HIDDEN
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_SYSTEM

public static final long FILE_ATTRIBUTE_SYSTEM
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_DIRECTORY

public static final long FILE_ATTRIBUTE_DIRECTORY
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_ARCHIVE

public static final long FILE_ATTRIBUTE_ARCHIVE
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_DEVICE

public static final long FILE_ATTRIBUTE_DEVICE
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_NORMAL

public static final long FILE_ATTRIBUTE_NORMAL
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_TEMPORARY

public static final long FILE_ATTRIBUTE_TEMPORARY
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_SPARSE_FILE

public static final long FILE_ATTRIBUTE_SPARSE_FILE
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_REPARSE_POINT

public static final long FILE_ATTRIBUTE_REPARSE_POINT
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_COMPRESSED

public static final long FILE_ATTRIBUTE_COMPRESSED
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_OFFLINE

public static final long FILE_ATTRIBUTE_OFFLINE
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_NOT_CONTENT_INDEXED

public static final long FILE_ATTRIBUTE_NOT_CONTENT_INDEXED
file attribute of dwFileAttributes.

See Also:
Constant Field Values

FILE_ATTRIBUTE_ENCRYPTED

public static final long FILE_ATTRIBUTE_ENCRYPTED
file attribute of dwFileAttributes.

See Also:
Constant Field Values
Constructor Detail

Win32FindData

public Win32FindData()
Method Detail

getLastErrorMessage

public final long getLastErrorMessage()
Get error code: Currently supported: ERROR_NO_MORE_FILES, ERROR_SUCCESS (default).

Returns:
Returns the lastErrorMessage.

setLastErrorMessage

public final void setLastErrorMessage(long errorCode)
Set error code: Currently supported: ERROR_NO_MORE_FILES, ERROR_SUCCESS (default).

Parameters:
errorCode - the error code

getFileAttributes

public final long getFileAttributes()
Get File attributes. Use at least the FILE_ATTRIBUTE_DIRECTORY flag (default) to distinguish between files and directories. Links should be returned as files.
Any combination of FILE_ATTRIBUTE_... constants

Returns:
Returns the dwFileAttributes.

setFileAttributes

public final void setFileAttributes(long fileAttributes)
Set File attributes. Use at least the FILE_ATTRIBUTE_DIRECTORY flag (default) to distinguish between files and directories. Links should be returned as files.
Any combination of FILE_ATTRIBUTE_... constants

Parameters:
fileAttributes - The dwFileAttributes to set.

getCreationTime

public final FileTime getCreationTime()
Get Set Currently unused. If available, set to the time when the file was created.

Returns:
Returns the ftCreationTime.

setCreationTime

public final void setCreationTime(FileTime creationTime)
Set Currently unused. If available, set to the time when the file was created.

Parameters:
creationTime - The ftCreationTime to set.

getLastAccessTime

public final FileTime getLastAccessTime()
Get Currently unused. If available, set to the time when the file was last accessed.

Returns:
Returns the ftLastAccessTime.

setLastAccessTime

public final void setLastAccessTime(FileTime lastAccessTime)
Set Currently unused. If available, set to the time when the file was last accessed.

Parameters:
lastAccessTime - The ftLastAccessTime to set.

getLastWriteTime

public final FileTime getLastWriteTime()
Get Time stamp shown in the Total Commander file list, and copied with files. Use the following settings for files which don't have a time:
ftLastWriteTime.dwHighDateTime=0
ftLastWriteTime.dwLowDateTime=0;

Returns:
Returns the ftLastWriteTime.

setLastWriteTime

public final void setLastWriteTime(FileTime lastWriteTime)
Set Time stamp shown in the Total Commander file list, and copied with files. Use the following settings for files which don't have a time:
ftLastWriteTime.dwHighDateTime=0
ftLastWriteTime.dwLowDateTime=0;

Parameters:
lastWriteTime - The ftLastWriteTime to set.

getFileSizeHigh

public final long getFileSizeHigh()
Get High word of file size.

Returns:
Returns the nFileSizeHigh.

setFileSizeHigh

public final void setFileSizeHigh(long fileSizeHigh)
Set High word of file size.

Parameters:
fileSizeHigh - The nFileSizeHigh to set.

getFileSizeLow

public final long getFileSizeLow()
Get Low word of file size.

Returns:
Returns the nFileSizeLow.

setFileSizeLow

public final void setFileSizeLow(long fileSizeLow)
Set Low word of file size.

Parameters:
fileSizeLow - The nFileSizeLow to set.

getReserved0

public final long getReserved0()
Get On Unix systems, you can | (or) the dwFileAttributes field with 0x80000000 and set the dwReserved0 parameter to the Unix file mode (permissions). These will then be shown in Wincmd and can be changed through Files - Change attributes.

Returns:
Returns the dwReserved0.

setReserved0

public final void setReserved0(long reserved0)
Set On Unix systems, you can | (or) the dwFileAttributes field with 0x80000000 and set the dwReserved0 parameter to the Unix file mode (permissions). These will then be shown in Wincmd and can be changed through Files - Change attributes.

Parameters:
reserved0 - The dwReserved0 to set.

getReserved1

public final long getReserved1()
Get Unused, must be set to 0. Reserved for future plugin enhancements.

Returns:
Returns the dwReserved1.

setReserved1

public final void setReserved1(long reserved1)
Set Unused, must be set to 0. Reserved for future plugin enhancements.

Parameters:
reserved1 - The dwReserved1 to set.

getFileName

public final java.lang.String getFileName()
Get Local file name relative to the directory (without the path).

Returns:
Returns the cFileName.

setFileName

public final void setFileName(java.lang.String fileName)
Set Local file name relative to the directory (without the path).

Parameters:
fileName - The cFileName to set.

getAlternateFileName

public final java.lang.String getAlternateFileName()
Get DOS-style file name (optional), set empty if unused.

Returns:
Returns the cAlternateFileName.

setAlternateFileName

public final void setAlternateFileName(java.lang.String alternateFileName)
Set DOS-style file name (optional), set empty if unused.

Parameters:
alternateFileName - The cAlternateFileName to set.

setFromFile

public final void setFromFile(java.io.File file)
Set Win32 find data.

Parameters:
file - the file with the information