|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.intarsys.tools.file.AttachmentTools
public class AttachmentTools
Utility methods to handle attachment relationships between files.
| Constructor Summary | |
|---|---|
AttachmentTools()
|
|
| Method Summary | |
|---|---|
static List |
createAttachments(File master,
File[] files,
String extensions)
Create a list of File instances selected from the array of
candidates that are recognized as attachments to file. |
static List |
createAttachments(File master,
String extensions)
Find all attachments to master. |
static void |
deleteAttachments(List attachments)
|
static File |
moveAttachment(File master,
File attachment,
File movedFile,
boolean delete)
|
static List |
moveAttachments(File master,
List attachments,
File movedFile,
boolean delete)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttachmentTools()
| Method Detail |
|---|
public static List createAttachments(File master,
File[] files,
String extensions)
File instances selected from the array of
candidates that are recognized as attachments to file.
The attachments are selected using a ";" separated list of suffixes (including the ".").
A file is accepted as an attachment if it has an attachment suffix and
the file base name is either the same as the target filename or target
file base name.
foo.bar
foo.bar.suffix (accepted)
foo.suffix (accepted)
foo.txt (rejected)
All checks are case insensitive.
master - files - extensions -
File instances selected from the array of
candidates that are recognized as attachments to
file.
public static List createAttachments(File master,
String extensions)
master. Attachments are defined to
be all files in the same directory as master that satisfy
one of the extensions.
master - extensions -
masterpublic static void deleteAttachments(List attachments)
public static File moveAttachment(File master,
File attachment,
File movedFile,
boolean delete)
public static List moveAttachments(File master,
List attachments,
File movedFile,
boolean delete)
|
intarsys runtime library | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||