Overview | Module | Use | Devguide | Index

Methods' Summary | Methods' Details | Attributes' Summary | Attributes' Details

:: com :: sun :: star :: ucb ::
interface XSimpleFileAccess
  Base Hierarchy
      ::com::sun::star::uno::XInterface
       |
       +-XSimpleFileAccess
Description This is the basic interface to read data from a stream.

Methods' Summary
copy | Copies a file
move | Moves a file
kill | Removes a file. If the URL represents a folder, the folder will be removed, even if it's not empty.
isFolder | Checks if an URL represents a folder
isReadOnly | Checks if a file is "read only"
setReadOnly | Sets the "read only" of a file according to the boolean parameter, if the actual process has the right to do so.
createFolder | Creates a new Folder
getSize | Returns the size of a file.
getContentType | Returns the content type of a file.
getDateTimeModified | Returns the last modified date for the file
getFolderContents | Returns the contents of a folder
exists | Checks if a file exists
openFileRead | Opens file to read
openFileWrite | Opens file to write.
openFileReadWrite | Opens file to read and write
setInteractionHandler |

Methods' Details
copy
void copy( | [in] string [in] string raises( | SourceURL, DestURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Copies a file Parameter SourceURL URL of the file to be copied Parameter DestURL URL of the location the file should be copied to See also move
move
void move( | [in] string [in] string raises( | SourceURL, DestURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Moves a file Parameter SourceURL URL of the file to be moved Parameter DestURL URL of the location the file should be moved to See also move
kill
void kill( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Removes a file. If the URL represents a folder, the folder will be removed, even if it's not empty. Parameter FileURL File/folder to be removed See also move
isFolder
boolean isFolder( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Checks if an URL represents a folder Parameter FileURL URL to be checked Returns true, if the given URL represents a folder, otherwise false
isReadOnly
boolean isReadOnly( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Checks if a file is "read only" Parameter FileURL URL to be checked Returns true, if the given File is "read only", false otherwise
setReadOnly
void setReadOnly( | [in] string [in] boolean raises( | FileURL, bReadOnly ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Sets the "read only" of a file according to the boolean parameter, if the actual process has the right to do so. Parameter bReadOnly true; "read only" flag will be set, false; "read only" flag will be reset
createFolder
void createFolder( | [in] string raises( | NewFolderURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Creates a new Folder Parameter NewFolderURL URL describing the location of the new folder
getSize
long getSize( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Returns the size of a file. Parameter FileURL URL of the file Returns Size of the file
getContentType
string getContentType( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Returns the content type of a file. See also XContent::getContentType Parameter FileURL URL of the file Returns Content type of the file
getDateTimeModified
::com::sun::star::util::DateTime getDateTimeModified( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Returns the last modified date for the file Parameter FileURL URL of the file Returns Last modified date for the file
getFolderContents
sequence< string > getFolderContents( | [in] string [in] boolean raises( | FolderURL, bIncludeFolders ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Returns the contents of a folder Parameter FolderURL URL of the folder Parameter bIncludeFolders true: Subfolders are included, false: No subfolders Returns The content of a folder, each file as one string in a string sequence
exists
boolean exists( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Checks if a file exists Parameter FileURL URL to be checked Returns true, if the File exists, false otherwise
openFileRead
::com::sun::star::io::XInputStream openFileRead( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Opens file to read Parameter FileURL File to open Returns An XInputStream, if the file can be opened for reading
openFileWrite
::com::sun::star::io::XOutputStream openFileWrite( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Opens file to write. Parameter FileURL File to open Returns An XOutputStream, if the file can be opened for writing Throws UnsupportedDataSinkException , if the 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.
openFileReadWrite
::com::sun::star::io::XStream openFileReadWrite( | [in] string raises( | FileURL ) CommandAbortedException, ::com::sun::star::uno::Exception );
Description Opens file to read and write Parameter FileURL File to open Returns An XStream, if the file can be opened for reading and writing Throws UnsupportedDataSinkException , if the 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.
setInteractionHandler
void setInteractionHandler( | [in] ::com::sun::star::task::XInteractionHandler | Handler );
Description

Top of Page

Copyright © 2003 Sun Microsystems, Inc.