truncate Unix utility/function.
| Modifier and Type | Field and Description |
|---|---|
| private Long | |
| private static final int | |
| private boolean | |
| private static final FileUtils | |
| private static final byte[] | |
| private static final String | |
| private Long | |
| private boolean | |
| private static final String | |
| private Path | |
| private static final String | |
| private static final Long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | add(ResourceCollection
the ResourceCollection to add. rc)Add a nested (filesystem-only) ResourceCollection. |
| public void | execute()
Overrides org. |
| private synchronized Path | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setMkdirs(boolean
boolean, default mkdirs)false.Set whether, when creating nonexistent files, nonexistent directories should also be created. |
| private boolean |
| adjust | back to summary |
|---|---|
| private Long adjust | |
| BUFFER_SIZE | back to summary |
|---|---|
| private static final int BUFFER_SIZE | |
| create | back to summary |
|---|---|
| private boolean create | |
| FILE_UTILS | back to summary |
|---|---|
| private static final FileUtils FILE_UTILS | |
| FILL_BUFFER | back to summary |
|---|---|
| private static final byte[] FILL_BUFFER | |
| INVALID_LENGTH | back to summary |
|---|---|
| private static final String INVALID_LENGTH | |
| length | back to summary |
|---|---|
| private Long length | |
| mkdirs | back to summary |
|---|---|
| private boolean mkdirs | |
| NO_CHILD | back to summary |
|---|---|
| private static final String NO_CHILD | |
| path | back to summary |
|---|---|
| private Path path | |
| READ_WRITE | back to summary |
|---|---|
| private static final String READ_WRITE | |
| ZERO | back to summary |
|---|---|
| private static final Long ZERO | |
| Truncate | back to summary |
|---|---|
| public Truncate() | |
| add | back to summary |
|---|---|
| public void add(ResourceCollection rc) Add a nested (filesystem-only) ResourceCollection.
| |
| execute | back to summary |
|---|---|
| public void execute() Overrides org. Doc from org. Called by the project to let the task do its work. This method may be called more than once, if the task is invoked more than once. For example, if target1 and target2 both depend on target3, then running "ant target1 target2" will run all tasks in target3 twice.. | |
| getPath | back to summary |
|---|---|
| private synchronized Path getPath() | |
| process | back to summary |
|---|---|
| private void process(File f) | |
| setAdjust | back to summary |
|---|---|
| public void setAdjust(Long adjust) Set the amount by which files' lengths should be adjusted. It is permissible to append K / M / G / T / P.
| |
| setCreate | back to summary |
|---|---|
| public void setCreate(boolean create) Set whether to create nonexistent files.
| |
| setFile | back to summary |
|---|---|
| public void setFile(File f) Set a single target File.
| |
| setLength | back to summary |
|---|---|
| public void setLength(Long length) Set the length to which files should be set. It is permissible to append K / M / G / T / P.
| |
| setMkdirs | back to summary |
|---|---|
| public void setMkdirs(boolean mkdirs) Set whether, when creating nonexistent files, nonexistent directories should also be created.
| |
| shouldProcess | back to summary |
|---|---|
| private boolean shouldProcess(File f) | |