LibreOffice
LibreOffice 6.2 SDK API Reference
Public Member Functions | List of all members
XSimpleFileAccess Interface Referencepublished

This is the basic interface to read data from a stream. More...

import"XSimpleFileAccess.idl";

Inheritance diagram for XSimpleFileAccess:
XInterface XSimpleFileAccess2 XSimpleFileAccess3 SimpleFileAccess

Public Member Functions

void copy ([in] string SourceURL, [in] string DestURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Copies a file. More...
 
void move ([in] string SourceURL, [in] string DestURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Moves a file. More...
 
void kill ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Removes a file. More...
 
boolean isFolder ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Checks if an URL represents a folder. More...
 
boolean isReadOnly ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Checks if a file is "read only". More...
 
void setReadOnly ([in] string FileURL, [in] boolean bReadOnly) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Sets the "read only" of a file according to the boolean parameter, if the actual process has the right to do so. More...
 
void createFolder ([in] string NewFolderURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Creates a new Folder. More...
 
long getSize ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Returns the size of a file. More...
 
string getContentType ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Returns the content type of a file. More...
 
::com::sun::star::util::DateTime getDateTimeModified ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Returns the last modified date for the file. More...
 
sequence< string > getFolderContents ([in] string FolderURL, [in] boolean bIncludeFolders) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Returns the contents of a folder. More...
 
boolean exists ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Checks if a file exists. More...
 
com::sun::star::io::XInputStream openFileRead ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Opens file to read. More...
 
com::sun::star::io::XOutputStream openFileWrite ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Opens file to write. More...
 
com::sun::star::io::XStream openFileReadWrite ([in] string FileURL) raises ( com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::Exception )
 Opens file to read and write. More...
 
void setInteractionHandler ([in] com::sun::star::task::XInteractionHandler Handler)
 Sets an interaction handler to be used for further operations. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

This is the basic interface to read data from a stream.

Member Function Documentation

void copy ( [in] string  SourceURL,
[in] string  DestURL 
)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Copies a file.

Parameters
SourceURLURL of the file to be copied
DestURLURL of the location the file should be copied to
See also
move
void createFolder ( [in] string  NewFolderURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Creates a new Folder.

Parameters
NewFolderURLURL describing the location of the new folder
boolean exists ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Checks if a file exists.

Parameters
FileURLURL to be checked
Returns
true, if the File exists, false otherwise
string getContentType ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Returns the content type of a file.

See also
XContent::getContentType
Parameters
FileURLURL of the file
Returns
Content type of the file

Returns the last modified date for the file.

Parameters
FileURLURL of the file
Returns
Last modified date for the file
sequence<string> getFolderContents ( [in] string  FolderURL,
[in] boolean  bIncludeFolders 
)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Returns the contents of a folder.

Parameters
FolderURLURL of the folder
bIncludeFolderstrue: Subfolders are included, false: No subfolders
Returns
The content of a folder, each file as one string in a string sequence
long getSize ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Returns the size of a file.

Parameters
FileURLURL of the file
Returns
Size of the file in bytes
boolean isFolder ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Checks if an URL represents a folder.

Parameters
FileURLURL to be checked
Returns
true, if the given URL represents a folder, otherwise false
boolean isReadOnly ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Checks if a file is "read only".

Parameters
FileURLURL to be checked
Returns
true, if the given File is "read only", false otherwise
void kill ( [in] string  FileURL)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Removes a file.

If the URL represents a folder, the folder will be removed, even if it's not empty.

Parameters
FileURLFile/folder to be removed
See also
move
void move ( [in] string  SourceURL,
[in] string  DestURL 
)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Moves a file.

Parameters
SourceURLURL of the file to be moved
DestURLURL of the location the file should be moved to
See also
move

Opens file to read.

Parameters
FileURLFile to open
Returns
An XInputStream, if the file can be opened for reading

Opens file to read and write.

Parameters
FileURLFile to open
Returns
An XStream, if the file can be opened for reading and writing
Exceptions
UnsupportedDataSinkException,ifthe file cannot be opened for random write access. Some resources do not allow random write access. To write data for those resources XSimpleFileAccess2::writeFile() may be used.

Opens file to write.

Parameters
FileURLFile to open
Returns
An XOutputStream, if the file can be opened for writing
Exceptions
UnsupportedDataSinkException,ifthe file cannot be opened for random write access. Some resources do not allow random write access. To write data for those resources XSimpleFileAccess2::writeFile() may be used.
void setInteractionHandler ( [in] com::sun::star::task::XInteractionHandler  Handler)

Sets an interaction handler to be used for further operations.

A default interaction handler is available as service com::sun::star::task::InteractionHandler. The documentation of this service also contains further information about the interaction handler concept.

See also
com::sun::star::task::InteractionHandler
Parameters
HandlerThe interaction handler to be set
void setReadOnly ( [in] string  FileURL,
[in] boolean  bReadOnly 
)
raises ( com::sun::star::ucb::CommandAbortedException,
com::sun::star::uno::Exception
)

Sets the "read only" of a file according to the boolean parameter, if the actual process has the right to do so.

Parameters
FileURLURL of the file
bReadOnlytrue; "read only" flag will be set, false; "read only" flag will be reset

The documentation for this interface was generated from the following file: