org.kde.koala

Class KSimpleFileFilter

public class KSimpleFileFilter extends KFileFilter

A simple file filter that can filter hidden dot files, by name, by mime type and by mode.

UNKNOWN: A simple file filter.

Constructor Summary
protected KSimpleFileFilter(Class dummy)
KSimpleFileFilter()
Creates a new filter.
Method Summary
voiddispose()
Delete the wrapped C++ instance ahead of finalize()
booleanfilterDotFiles()
Checks whether filtering dot files is enabled.
booleanfilterSpecials()
Checks whether it filters "." and "..", default is true.
protected voidfinalize()
Deletes the wrapped C++ instance
booleanisDisposed()
Has the wrapped C++ instance been deleted?
ArrayListmimeFilters()
Returns the list of mime types.
longmodeFilter()
Returns the mode filter, as set by setModeFilter().
booleanpassesFilter(KFileItem item)
Checks the given item.
voidsetFilterDotFiles(boolean filter)
Enable or disable filtering hidden dot files.
voidsetFilterSpecials(boolean filter)
Filters "." and "..", default is true.
voidsetMimeFilters(String[] mimeFilters)
Sets a list of mime filters.
voidsetModeFilter(long mode)
Sets the mode filter.
voidsetNameFilters(String nameFilters, boolean caseSensitive, char separator)
Sets a list of regular expressions to filter by name.
voidsetNameFilters(String nameFilters, boolean caseSensitive)
voidsetNameFilters(String nameFilters)
Sets a list of regular expressions to filter by name.

Constructor Detail

KSimpleFileFilter

protected KSimpleFileFilter(Class dummy)

KSimpleFileFilter

public KSimpleFileFilter()
Creates a new filter. By default, it filters only hidden dot files and "." and "..".

UNKNOWN: Creates a new filter.

Method Detail

dispose

public void dispose()
Delete the wrapped C++ instance ahead of finalize()

filterDotFiles

public boolean filterDotFiles()
Checks whether filtering dot files is enabled. This option is enabled by default.

Returns: true if filtering is enabled, false otherwise

See Also: KSimpleFileFilter

UNKNOWN: Checks whether filtering dot files is enabled.

filterSpecials

public boolean filterSpecials()
Checks whether it filters "." and "..", default is true.

Returns: true if enabled, false otherwise

UNKNOWN: Checks whether it filters ".

finalize

protected void finalize()
Deletes the wrapped C++ instance

isDisposed

public boolean isDisposed()
Has the wrapped C++ instance been deleted?

mimeFilters

public ArrayList mimeFilters()
Returns the list of mime types.

Returns: the list of mime types

See Also: KSimpleFileFilter

UNKNOWN: Returns the list of mime types.

modeFilter

public long modeFilter()
Returns the mode filter, as set by setModeFilter().

Returns: the mode filter, 0 if disabled

See Also: KSimpleFileFilter

UNKNOWN: Returns the mode filter, as set by setModeFilter().

passesFilter

public boolean passesFilter(KFileItem item)
Checks the given item.

Parameters: item the item to filter

Returns: true if the item passes the filter, false otherwise

UNKNOWN: Checks the given item.

setFilterDotFiles

public void setFilterDotFiles(boolean filter)
Enable or disable filtering hidden dot files. This option is enabled by default.

Parameters: filter true to enable filtering dot files, false to disable

See Also: KSimpleFileFilter

UNKNOWN: Enable or disable filtering hidden dot files.

setFilterSpecials

public void setFilterSpecials(boolean filter)
Filters "." and "..", default is true.

Parameters: filter true to enable, false otherwise

UNKNOWN: Filters ".

setMimeFilters

public void setMimeFilters(String[] mimeFilters)
Sets a list of mime filters. A file can only pass if its mime type is contained in this list.

Parameters: mimeFilters the list of mime types

See Also: KSimpleFileFilter

UNKNOWN: Sets a list of mime filters.

setModeFilter

public void setModeFilter(long mode)
Sets the mode filter. If the mode is 0, the filter is disabled. When enabled, a file will only pass if the files mode ANDed with mode is not zero.

Parameters: mode the new mode. 0 to disable

See Also: KSimpleFileFilter

UNKNOWN: Sets the mode filter.

setNameFilters

public void setNameFilters(String nameFilters, boolean caseSensitive, char separator)
Sets a list of regular expressions to filter by name. The file will only pass if its name matches one of the regular expressions.

Parameters: nameFilters a list of regular expressions, separated by the character separator caseSensitive if true, matches case sensitive. False otherwise separator the separator in the nameFilter

UNKNOWN: Sets a list of regular expressions to filter by name.

setNameFilters

public void setNameFilters(String nameFilters, boolean caseSensitive)

setNameFilters

public void setNameFilters(String nameFilters)
Sets a list of regular expressions to filter by name. The file will only pass if its name matches one of the regular expressions.

Parameters: nameFilters a list of regular expressions, separated by space (' ')

UNKNOWN: Sets a list of regular expressions to filter by name.