01: // Copyright (C) 2002 by Jason Hunter <jhunter_AT_acm_DOT_org>.
02: // All rights reserved. Use of this class is limited.
03: // Please see the LICENSE for more information.
04:
05: package com.oreilly.servlet.multipart;
06:
07: import java.io.*;
08:
09: /**
10: * An interface to provide a pluggable file renaming policy, particularly
11: * useful to handle naming conflicts with an existing file.
12: *
13: * @author Jason Hunter
14: * @version 1.0, 2002/04/30, initial revision, thanks to Changshin Lee for
15: * the basic idea
16: */
17: public interface FileRenamePolicy {
18:
19: /**
20: * Returns a File object holding a new name for the specified file.
21: *
22: * @see FilePart#writeTo(File fileOrDirectory)
23: */
24: public File rename(File f);
25:
26: }
|