Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/flexstor/common/io/xfile/XFileDeleteI.java


1   /*
2    * XFileDeleteI.java
3    *
4    * Copyright $Date: 2003/08/11 02:22:39 $ FLEXSTOR.net Inc.
5    *
6    * This work is licensed for use and distribution under license terms found at
7    * http://www.flexstor.org/license.html
8    *
9    */
10  
11  package com.flexstor.common.io.xfile;
12  
13  /**
14   * This interface defines all the methods to be implemented by a delete utility
15   * for a specific file protocol.
16   * Every file protocol must have a delete utility class.
17   */
18  public interface XFileDeleteI
19     extends XFileAccessorI
20  {
21     /**
22      * Deletes the directory specified. This operation will delete any files and subdirectories.
23      */
24     public boolean  deleteDirectory( String sDir );
25  
26     /**
27      * Deletes the directory specified. If the second argument is false, it will remove the directory
28      * only if it is empty; if true, it will delete the directory regardless of its content.
29      */
30     public boolean  deleteDirectory( String sDir, boolean bDeleteContent );
31  
32     /**
33      * Deletes the file specified. If the file is the only one left, its directory will also be
34      * removed.
35      */
36     public boolean  deleteFile( String sFile );
37  
38     /**
39      * Deletes the file specified. If the second argument is true, it will remove the directory if it
40      * is empty; if false, it will not remove the directory even if it is empty.
41      */
42     public boolean  deleteFile( String sFile, boolean bRemoveParentIfEmpty );
43  }