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 */
017package org.apache.commons.vfs2;
018
019/**
020 * An enumerated type representing the capabilities of files and file systems.
021 */
022public enum Capability
023{
024    /**
025     * File content can be read.
026     */
027    READ_CONTENT,
028
029    /**
030     * File content can be written.
031     */
032    WRITE_CONTENT,
033
034    /**
035     * File content can be read in random mode.
036     */
037    RANDOM_ACCESS_READ,
038
039    /**
040     * File content length can be set in random mode.
041     */
042    RANDOM_ACCESS_SET_LENGTH,
043
044    /**
045     * File content can be written in random mode.
046     */
047    RANDOM_ACCESS_WRITE,
048
049    /**
050     * File content can be appended.
051     */
052    APPEND_CONTENT,
053
054    /**
055     * File attributes are supported.
056     */
057    ATTRIBUTES,
058
059    /**
060     * File last-modified time is supported.
061     */
062    LAST_MODIFIED,
063
064    /**
065     * File get last-modified time is supported.
066     */
067    GET_LAST_MODIFIED,
068
069    /**
070     * File set last-modified time is supported.
071     */
072    SET_LAST_MODIFIED_FILE,
073
074    /**
075     * folder set last-modified time is supported.
076     */
077    SET_LAST_MODIFIED_FOLDER,
078
079    /**
080     * File content signing is supported.
081     */
082    SIGNING,
083
084    /**
085     * Files can be created.
086     */
087    CREATE,
088
089    /**
090     * Files can be deleted.
091     */
092    DELETE,
093
094    /**
095     * Files can be renamed.
096     */
097    RENAME,
098
099    /**
100     * The file type can be determined.
101     */
102    GET_TYPE,
103
104    /**
105     * Children of files can be listed.
106     */
107    LIST_CHILDREN,
108
109    /**
110     * URI are supported.  Files without this capability use URI that do not
111     * globally and uniquely identify the file.
112     */
113    URI,
114
115    /**
116     * File system attributes are supported.
117     */
118    FS_ATTRIBUTES,
119
120    /**
121     * Junctions are supported.
122     */
123    JUNCTIONS,
124
125    /**
126     * The set of attributes defined by the Jar manifest specification are
127     * supported.  The attributes aren't necessarily stored in a manifest file.
128     */
129    MANIFEST_ATTRIBUTES,
130
131    /**
132     * The provider itself do not provide a filesystem. It simply resolves a full name
133     * and dispatches the request back to the filesystemmanager.<br>
134     * A provider with this capability cant tell much about the capabilities about the
135     * finally used filesystem in advance.
136     */
137    DISPATCHER,
138
139    /**
140     * A compressed filesystem is a filesystem which use compression.
141     */
142    COMPRESS,
143
144    /**
145     * A virtual filesystem can be an archive like tar or zip.
146     */
147    VIRTUAL,
148
149    /**
150     * Provides directories which allows you to read its content through
151     * {@link org.apache.commons.vfs2.FileContent#getInputStream()}.
152     * @since 2.0
153     */
154    DIRECTORY_READ_CONTENT;
155}