1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_io_FilePermission_idl__
28#define __com_sun_star_io_FilePermission_idl__
29//=============================================================================
30
31module com {  module sun {  module star {  module io {
32
33//=============================================================================
34
35/** This permission represents access to a file or directory.
36    A FilePermission consists of a file url and a set of actions valid for that url.
37    <p>
38    The path of the file url that ends in <code>"/*"</code> indicates all the files and
39    directories contained in that directory.  A path that ends with <code>"/-"</code>
40    indicates (recursively) all files and subdirectories contained in that
41    directory.  A file url string consisting of the special token
42    <code>"&lt;&lt;ALL FILES&gt;&gt;"</code> matches any file.
43    <br>
44    Note: A file url string consisting of a single <code>"*"</code> indicates all the files
45    in the current directory, while a string consisting of a single <code>"-"</code> indicates
46    all the files in the current directory and (recursively) all files and
47    subdirectories contained in the current directory.
48    <br>
49    The actions to be granted is a list of one or more comma-separated keywords.
50    The possible keywords are <code>"read"</code>, <code>"write"</code>,
51    <code>"execute"</code>, and <code>"delete"</code>.
52    Their meaning is defined as follows:
53    <ul>
54    <li><code>read</code> -- read permission</li>
55    <li><code>write</code> -- write permission</li>
56    <li><code>execute</code> -- execute permission</li>
57    <li><code>delete</code> -- delete permission</li>
58    </ul><br>
59    The actions string is processed case-insensitive.
60    </p>
61
62    @attention
63    Be careful when granting FilePermissions.  Think about the implications of
64    granting read and especially write access to various files and directories.
65    The <code>"&lt;&lt;ALL FILES&gt;&gt;"</code> permission with write action is
66    especially dangerous.  This grants permission to write to the entire file system.
67
68    @since OOo 1.1.2
69*/
70published struct FilePermission
71{
72	/** target file url
73	*/
74	string URL;
75	/** comma separated actions list
76	*/
77	string Actions;
78};
79
80//=============================================================================
81
82}; }; }; };
83
84#endif
85