Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / offapi / com / sun / star / ucb / XSimpleFileAccess.idl
blobf1248cba251a3c204d4428f5ed682a2658eee9e1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
23 module com { module sun { module star { module ucb {
25 /** This is the basic interface to read data from a stream.
27 published interface XSimpleFileAccess: com::sun::star::uno::XInterface
30 /** Copies a file
32 @param SourceURL
33 URL of the file to be copied
34 @param DestURL
35 URL of the location the file should be copied to
37 @see move
39 void copy( [in] string SourceURL, [in] string DestURL )
40 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
42 /** Moves a file
44 @param SourceURL
45 URL of the file to be moved
46 @param DestURL
47 URL of the location the file should be moved to
49 @see move
51 void move( [in] string SourceURL, [in] string DestURL )
52 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
54 /** Removes a file. If the URL represents a folder, the folder will be
55 removed, even if it's not empty.
57 @param FileURL
58 File/folder to be removed
60 @see move
62 void kill( [in] string FileURL )
63 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
65 /** Checks if a URL represents a folder
67 @param FileURL
68 URL to be checked
70 @return
71 true, if the given URL represents a folder, otherwise false
73 boolean isFolder( [in] string FileURL )
74 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
76 /** Checks if a file is "read only"
78 @param FileURL
79 URL to be checked
81 @return
82 true, if the given File is "read only", false otherwise
84 boolean isReadOnly( [in] string FileURL )
85 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
87 /** Sets the "read only" of a file according to the boolean parameter,
88 if the actual process has the right to do so.
90 @param FileURL
91 URL of the file
93 @param bReadOnly
94 true; "read only" flag will be set, false; "read only" flag will be reset
96 void setReadOnly( [in] string FileURL, [in] boolean bReadOnly )
97 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
99 /** Creates a new Folder
101 @param NewFolderURL
102 URL describing the location of the new folder
104 void createFolder( [in] string NewFolderURL )
105 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
107 /** Returns the size of a file.
109 @param FileURL
110 URL of the file
112 @return Size of the file in bytes
114 long getSize( [in] string FileURL )
115 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
117 /** Returns the content type of a file.
119 @see XContent::getContentType
121 @param FileURL
122 URL of the file
124 @return Content type of the file
126 string getContentType( [in] string FileURL )
127 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
129 /** Returns the last modified date for the file
131 @param FileURL
132 URL of the file
134 @return Last modified date for the file
136 ::com::sun::star::util::DateTime getDateTimeModified( [in] string FileURL )
137 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
139 /** Returns the contents of a folder
141 @param FolderURL
142 URL of the folder
143 @param bIncludeFolders
144 true: Subfolders are included, false: No subfolders
146 @return The content of a folder, each file as one string
147 in a string sequence
149 sequence<string> getFolderContents( [in] string FolderURL, [in] boolean bIncludeFolders )
150 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
152 /** Checks if a file exists
154 @param FileURL
155 URL to be checked
157 @return
158 true, if the File exists, false otherwise
160 boolean exists( [in] string FileURL )
161 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
164 /** Opens file to read
166 @param FileURL
167 File to open
169 @return
170 An XInputStream, if the file can be opened for reading
172 com::sun::star::io::XInputStream openFileRead( [in] string FileURL )
173 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
175 /** Opens file to write.
177 @param FileURL
178 File to open
180 @return
181 An XOutputStream, if the file can be opened for writing
183 @throws
184 UnsupportedDataSinkException, if the file cannot be
185 opened for random write access. Some resources do not allow random
186 write access. To write data for those resources
187 XSimpleFileAccess2::writeFile() may be used.
189 com::sun::star::io::XOutputStream openFileWrite( [in] string FileURL )
190 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
192 /** Opens file to read and write
194 @param FileURL
195 File to open
197 @return
198 An XStream, if the file can be opened for reading and writing
200 @throws
201 UnsupportedDataSinkException, if the file cannot be
202 opened for random write access. Some resources do not allow random
203 write access. To write data for those resources
204 XSimpleFileAccess2::writeFile() may be used.
206 com::sun::star::io::XStream openFileReadWrite( [in] string FileURL )
207 raises( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception );
209 /** Sets an interaction handler to be used for further operations.
212 A default interaction handler is available as service
213 com::sun::star::task::InteractionHandler.
214 The documentation of this service also contains further
215 information about the interaction handler concept.
216 </p>
218 @see com::sun::star::task::InteractionHandler
220 @param Handler
221 The interaction handler to be set
223 void setInteractionHandler( [in] com::sun::star::task::XInteractionHandler Handler );
228 }; }; }; };
230 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */