001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.commons.vfs2;
018    
019    /**
020     * An enumerated type representing the capabilities of files and file systems.
021     *
022     * @author <a href="http://commons.apache.org/vfs/team-list.html">Commons VFS team</a>
023     */
024    public enum Capability
025    {
026        /**
027         * File content can be read.
028         */
029        READ_CONTENT,
030    
031        /**
032         * File content can be written.
033         */
034        WRITE_CONTENT,
035    
036        /**
037         * File content can be read in random mode.<br>
038         */
039        RANDOM_ACCESS_READ,
040    
041        /**
042         * File content can be written in random mode.<br>
043         */
044        RANDOM_ACCESS_WRITE,
045    
046        /**
047         * File content can be appended.
048         */
049        APPEND_CONTENT,
050    
051        /**
052         * File attributes are supported.
053         */
054        ATTRIBUTES,
055    
056        /**
057         * File last-modified time is supported.
058         */
059        LAST_MODIFIED,
060    
061        /**
062         * File get last-modified time is supported.
063         */
064        GET_LAST_MODIFIED,
065    
066        /**
067         * File set last-modified time is supported.
068         */
069        SET_LAST_MODIFIED_FILE,
070    
071        /**
072         * folder set last-modified time is supported.
073         */
074        SET_LAST_MODIFIED_FOLDER,
075    
076        /**
077         * File content signing is supported.
078         */
079        SIGNING,
080    
081        /**
082         * Files can be created.
083         */
084        CREATE,
085    
086        /**
087         * Files can be deleted.
088         */
089        DELETE,
090    
091        /**
092         * Files can be renamed.
093         */
094        RENAME,
095    
096        /**
097         * The file type can be determined.
098         */
099        GET_TYPE,
100    
101        /**
102         * Children of files can be listed.
103         */
104        LIST_CHILDREN,
105    
106        /**
107         * URI are supported.  Files without this capability use URI that do not
108         * globally and uniquely identify the file.
109         */
110        URI,
111    
112        /**
113         * File system attributes are supported.
114         */
115        FS_ATTRIBUTES,
116    
117        /**
118         * Junctions are supported.
119         */
120        JUNCTIONS,
121    
122        /**
123         * The set of attributes defined by the Jar manifest specification are
124         * supported.  The attributes aren't necessarily stored in a manifest file.
125         */
126        MANIFEST_ATTRIBUTES,
127    
128        /**
129         * The provider itself do not provide a filesystem. It simply resolves a full name
130         * and dispatches the request back to the filesystemmanager.<br>
131         * A provider with this capability cant tell much about the capabilities about the
132         * finally used filesystem in advance.
133         */
134        DISPATCHER,
135    
136        /**
137         * A compressed filesystem is a filesystem which use compression.
138         */
139        COMPRESS,
140    
141        /**
142         * A virtual filesystem can be an archive like tar or zip.
143         */
144        VIRTUAL,
145    
146        /**
147         * Provides directories which allows you to read its content through
148         * {@link org.apache.commons.vfs2.FileContent#getInputStream()}.
149         * @since 2.0
150         */
151        DIRECTORY_READ_CONTENT;
152    }