1408a4873SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3408a4873SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4408a4873SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5408a4873SAndrew Rist * distributed with this work for additional information
6408a4873SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7408a4873SAndrew Rist * to you under the Apache License, Version 2.0 (the
8408a4873SAndrew Rist * "License"); you may not use this file except in compliance
9408a4873SAndrew Rist * with the License.  You may obtain a copy of the License at
10408a4873SAndrew Rist *
11408a4873SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12408a4873SAndrew Rist *
13408a4873SAndrew Rist * Unless required by applicable law or agreed to in writing,
14408a4873SAndrew Rist * software distributed under the License is distributed on an
15408a4873SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16408a4873SAndrew Rist * KIND, either express or implied.  See the License for the
17408a4873SAndrew Rist * specific language governing permissions and limitations
18408a4873SAndrew Rist * under the License.
19408a4873SAndrew Rist *
20408a4873SAndrew Rist *************************************************************/
21408a4873SAndrew Rist
22408a4873SAndrew Rist
23cdf0e10cSrcweir#ifndef __com_sun_star_io_FilePermission_idl__
24cdf0e10cSrcweir#define __com_sun_star_io_FilePermission_idl__
25cdf0e10cSrcweir//=============================================================================
26cdf0e10cSrcweir
27cdf0e10cSrcweirmodule com {  module sun {  module star {  module io {
28cdf0e10cSrcweir
29cdf0e10cSrcweir//=============================================================================
30cdf0e10cSrcweir
31cdf0e10cSrcweir/** This permission represents access to a file or directory.
32cdf0e10cSrcweir    A FilePermission consists of a file url and a set of actions valid for that url.
33cdf0e10cSrcweir    <p>
34cdf0e10cSrcweir    The path of the file url that ends in <code>"/*"</code> indicates all the files and
35cdf0e10cSrcweir    directories contained in that directory.  A path that ends with <code>"/-"</code>
36cdf0e10cSrcweir    indicates (recursively) all files and subdirectories contained in that
37cdf0e10cSrcweir    directory.  A file url string consisting of the special token
38cdf0e10cSrcweir    <code>"&lt;&lt;ALL FILES&gt;&gt;"</code> matches any file.
39cdf0e10cSrcweir    <br>
40cdf0e10cSrcweir    Note: A file url string consisting of a single <code>"*"</code> indicates all the files
41cdf0e10cSrcweir    in the current directory, while a string consisting of a single <code>"-"</code> indicates
42cdf0e10cSrcweir    all the files in the current directory and (recursively) all files and
43cdf0e10cSrcweir    subdirectories contained in the current directory.
44cdf0e10cSrcweir    <br>
45cdf0e10cSrcweir    The actions to be granted is a list of one or more comma-separated keywords.
46cdf0e10cSrcweir    The possible keywords are <code>"read"</code>, <code>"write"</code>,
47cdf0e10cSrcweir    <code>"execute"</code>, and <code>"delete"</code>.
48cdf0e10cSrcweir    Their meaning is defined as follows:
49cdf0e10cSrcweir    <ul>
50cdf0e10cSrcweir    <li><code>read</code> -- read permission</li>
51cdf0e10cSrcweir    <li><code>write</code> -- write permission</li>
52cdf0e10cSrcweir    <li><code>execute</code> -- execute permission</li>
53cdf0e10cSrcweir    <li><code>delete</code> -- delete permission</li>
54cdf0e10cSrcweir    </ul><br>
55cdf0e10cSrcweir    The actions string is processed case-insensitive.
56cdf0e10cSrcweir    </p>
57cdf0e10cSrcweir
58cdf0e10cSrcweir    @attention
59cdf0e10cSrcweir    Be careful when granting FilePermissions.  Think about the implications of
60cdf0e10cSrcweir    granting read and especially write access to various files and directories.
61cdf0e10cSrcweir    The <code>"&lt;&lt;ALL FILES&gt;&gt;"</code> permission with write action is
62cdf0e10cSrcweir    especially dangerous.  This grants permission to write to the entire file system.
63cdf0e10cSrcweir
64*95a17a32SJürgen Schmidt    @since OpenOffice 1.1.2
65cdf0e10cSrcweir*/
66cdf0e10cSrcweirpublished struct FilePermission
67cdf0e10cSrcweir{
68cdf0e10cSrcweir	/** target file url
69cdf0e10cSrcweir	*/
70cdf0e10cSrcweir	string URL;
71cdf0e10cSrcweir	/** comma separated actions list
72cdf0e10cSrcweir	*/
73cdf0e10cSrcweir	string Actions;
74cdf0e10cSrcweir};
75cdf0e10cSrcweir
76cdf0e10cSrcweir//=============================================================================
77cdf0e10cSrcweir
78cdf0e10cSrcweir}; }; }; };
79cdf0e10cSrcweir
80cdf0e10cSrcweir#endif
81