public class TarEntry
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static int |
DIRECTORY
Entry type for directories.
|
static int |
FILE
Entry type for normal files.
|
Constructor and Description |
---|
TarEntry(java.lang.String name)
Create a new TarEntry for a file of the given name.
|
Modifier and Type | Method and Description |
---|---|
int |
getFileType()
Returns the type of this file, one of FILE, LINK, SYM_LINK,
CHAR_DEVICE, BLOCK_DEVICE, DIRECTORY or FIFO.
|
long |
getMode()
Returns the mode of the file in UNIX permissions format.
|
java.lang.String |
getName()
Returns the name of the file.
|
long |
getSize()
Returns the size of the file in bytes.
|
long |
getTime()
Returns the modification time of the file in seconds since January
1st 1970.
|
void |
setFileType(int type)
Sets the type of the file, one of FILE, LINK, SYMLINK, CHAR_DEVICE,
BLOCK_DEVICE, or DIRECTORY.
|
void |
setMode(long mode)
Sets the mode of the file in UNIX permissions format.
|
void |
setSize(long size)
Sets the size of the file in bytes.
|
void |
setTime(long time)
Sets the modification time of the file in seconds since January
1st 1970.
|
public static final int FILE
public static final int DIRECTORY
public TarEntry(java.lang.String name)
name
- filenamepublic int getFileType()
public long getMode()
public java.lang.String getName()
public long getSize()
public long getTime()
public void setFileType(int type)
type
- public void setMode(long mode)
mode
- public void setSize(long size)
size
- public void setTime(long time)
time
-