public class FileResource
extends Object
implements Serializable
File
.Constructor and Description |
---|
FileResource()
Instantiates a new FileResource.
|
FileResource(File file)
Instantiates a new FileResource from the file object.
|
Modifier and Type | Method and Description |
---|---|
String |
getId()
Gets the file id.
|
long |
getLastModified()
Gets the time when file was last modified.
|
String |
getName()
Gets the name.
|
String |
getPath()
Gets the path.
|
long |
getSize()
Gets the size.
|
boolean |
isDirectory()
Checks if file is a directory.
|
void |
setId(String id)
Sets the file id.
|
void |
setIsDirectory(boolean value)
Sets the flag isDirectory.
|
void |
setLastModified(long value)
Sets the last modification time.
|
void |
setName(String value)
Sets the name.
|
void |
setPath(String value)
Sets the path.
|
void |
setSize(long value)
Sets the size.
|
public FileResource()
public FileResource(File file)
file
- the filepublic long getLastModified()
public String getName()
public String getPath()
public long getSize()
public boolean isDirectory()
public void setIsDirectory(boolean value)
value
- the new value for the isDirectory flagpublic void setLastModified(long value)
value
- the new last modification timepublic void setName(String value)
value
- the new namepublic void setPath(String value)
value
- the new pathpublic void setSize(long value)
value
- the new sizepublic String getId()
public void setId(String id)
id
- the new file idCopyright © 2010-2020 Toolsverse. All Rights Reserved.