Top Description Fields Constructors Methods
io.vertx.core.file

public Class FileSystemOptions

extends Object
Class Inheritance
Annotations
@DataObject
@JsonGen
publicConverter:false
Imports
io.vertx.codegen.annotations.DataObject, io.vertx.codegen.json.annotations.JsonGen, io.vertx.core.file.impl.FileResolverImpl, io.vertx.core.json.JsonObject, java.io.File

Vert.x file system base configuration, this class can be extended by provider implementations to configure those specific implementations.

Field Summary

Modifier and TypeField and Description
private boolean
private static final String
public static final boolean
DEFAULT_CLASS_PATH_RESOLVING_ENABLED

The default behavior to cache or not class path resolution = false if and only if the system property "vertx.disableFileCPResolving" exists and is set to the string "false"

public static final String
DEFAULT_FILE_CACHING_DIR

The default file caching dir.

public static final boolean
DEFAULT_FILE_CACHING_ENABLED

The default behavior for caching files for class path resolution = false if and only if the system property "vertx.disableFileCaching" exists and is set to the string "false"

private String
private boolean
private static final String

Constructor Summary

AccessConstructor and Description
public
FileSystemOptions()

Default constructor

public
FileSystemOptions(FileSystemOptions
The other FileSystemOptions to copy when creating this
other
)

Copy constructor

public
FileSystemOptions(JsonObject
the json object
json
)
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Creates a new instance of FileSystemOptions from the JSON object.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the configured file cache dir
getFileCacheDir
()

public boolean

Returns:

whether classpath resolving is enabled
isClassPathResolvingEnabled
()

public boolean

Returns:

whether file caching is enabled for class path resolving
isFileCachingEnabled
()

public FileSystemOptions

Returns:

a reference to this, so the API can be used fluently
setClassPathResolvingEnabled
(boolean
the value
classPathResolvingEnabled
)

When vert.x cannot find the file on the filesystem it tries to resolve the file from the class path when this is set to true.

public FileSystemOptions

Returns:

a reference to this, so the API can be used fluently
setFileCacheDir
(String
the value
fileCacheDir
)

When vert.x reads a file that is packaged with the application it gets extracted to this directory first and subsequent reads will use the extracted file to get better IO performance.

public FileSystemOptions

Returns:

a reference to this, so the API can be used fluently
setFileCachingEnabled
(boolean
the value
fileCachingEnabled
)

Set to true to cache files on the real file system when the filesystem performs class path resolving.

public JsonObject

Returns:

the JSON representation
toJson
()
References Deprecated JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

Builds a JSON object representing the current FileSystemOptions.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

classPathResolvingEnabledback to summary
private boolean classPathResolvingEnabled
DEFAULT_CACHE_DIR_BASEback to summary
private static final String DEFAULT_CACHE_DIR_BASE
DEFAULT_CLASS_PATH_RESOLVING_ENABLEDback to summary
public static final boolean DEFAULT_CLASS_PATH_RESOLVING_ENABLED

The default behavior to cache or not class path resolution = false if and only if the system property "vertx.disableFileCPResolving" exists and is set to the string "false"

DEFAULT_FILE_CACHING_DIRback to summary
public static final String DEFAULT_FILE_CACHING_DIR

The default file caching dir. If the system property "vertx.cacheDirBase" is set, then this is the value If not, then the system property java.io.tmpdir is taken or {code .} if not set. suffixed with vertx-cache.

DEFAULT_FILE_CACHING_ENABLEDback to summary
public static final boolean DEFAULT_FILE_CACHING_ENABLED

The default behavior for caching files for class path resolution = false if and only if the system property "vertx.disableFileCaching" exists and is set to the string "false"

fileCacheDirback to summary
private String fileCacheDir
fileCachingEnabledback to summary
private boolean fileCachingEnabled
TMPDIRback to summary
private static final String TMPDIR

Constructor Detail

FileSystemOptionsback to summary
public FileSystemOptions()

Default constructor

FileSystemOptionsback to summary
public FileSystemOptions(FileSystemOptions other)

Copy constructor

Parameters
other:FileSystemOptions

The other FileSystemOptions to copy when creating this

FileSystemOptionsback to summary
public FileSystemOptions(JsonObject json)

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Creates a new instance of FileSystemOptions from the JSON object. This JSOn object has (generally) been generated using toJson().

Parameters
json:JsonObject

the json object

Method Detail

getFileCacheDirback to summary
public String getFileCacheDir()
Returns:String

the configured file cache dir

isClassPathResolvingEnabledback to summary
public boolean isClassPathResolvingEnabled()
Returns:boolean

whether classpath resolving is enabled

isFileCachingEnabledback to summary
public boolean isFileCachingEnabled()
Returns:boolean

whether file caching is enabled for class path resolving

setClassPathResolvingEnabledback to summary
public FileSystemOptions setClassPathResolvingEnabled(boolean classPathResolvingEnabled)

When vert.x cannot find the file on the filesystem it tries to resolve the file from the class path when this is set to true.

Parameters
classPathResolvingEnabled:boolean

the value

Returns:FileSystemOptions

a reference to this, so the API can be used fluently

setFileCacheDirback to summary
public FileSystemOptions setFileCacheDir(String fileCacheDir)

When vert.x reads a file that is packaged with the application it gets extracted to this directory first and subsequent reads will use the extracted file to get better IO performance.

Parameters
fileCacheDir:String

the value

Returns:FileSystemOptions

a reference to this, so the API can be used fluently

setFileCachingEnabledback to summary
public FileSystemOptions setFileCachingEnabled(boolean fileCachingEnabled)

Set to true to cache files on the real file system when the filesystem performs class path resolving.

Parameters
fileCachingEnabled:boolean

the value

Returns:FileSystemOptions

a reference to this, so the API can be used fluently

toJsonback to summary
public JsonObject toJson()

References Deprecated

JsonObject is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Builds a JSON object representing the current FileSystemOptions.

Returns:JsonObject

the JSON representation

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override