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