Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package org.litesoft.textfiledirectory;

import org.litesoft.commonfoundation.annotations.*;
import org.litesoft.core.simpletypes.*;

public interface TextFileDirectory
{
    public class FileAlreadyExists extends TextFileDirectoryException
    {
        public FileAlreadyExists( String message )
        {
            super( message );
        }
    }

    public class FileDoesNotExists extends TextFileDirectoryException
    {
        public FileDoesNotExists( String message )
        {
            super( message );
        }
    }

    /**
     * Return the Directory path <i>behind</i> this TextFileDirectory.
     */
    String getDirectoryPath();

    /**
     * Return if the Directory represented by this instance currently exists.
     */
    boolean exists();

    /**
     * Get the list of File Names that have the extension(s) indicated by <code>pExtensions</code>, no extensions means all files.
     *
     * @param pExtensions of the files of interest without the '.', e.g. "txt" or "java" (the extension is case sensitive).
     *
     * @return Non Null String array (may be an empty array) of the file names (with the extensions) found.
     */
    @NotNull String[] getFiles( String... pExtensions );

    TextFile load( @NotNull String pFileName )
            throws FileDoesNotExists;

    void create( @NotNull TextFile pFile )
            throws FileAlreadyExists;

    void update( @NotNull TextFile pFile )
            throws FileDoesNotExists;

    void delete( @NotNull TextFile pFile )
            throws FileDoesNotExists;

    void delete( @NotNull String pFileName )
            throws FileDoesNotExists;
}

Commits for litesoft/trunk/Java/core/Server/src/org/litesoft/textfiledirectory/TextFileDirectory.java

Diff revisions: vs.
Revision Author Commited Message
939 Diff Diff GeorgeS picture GeorgeS Mon 02 Jun, 2014 21:30:31 +0000

Extracting commonfoundation

836 Diff Diff GeorgeS picture GeorgeS Wed 05 Sep, 2012 15:01:18 +0000
791 Diff Diff GeorgeS picture GeorgeS Sun 12 Aug, 2012 15:22:58 +0000

!

789 GeorgeS picture GeorgeS Sat 11 Aug, 2012 17:47:31 +0000