| com.xoetrope.service.file.FileSave
FileSave | public class FileSave extends ServiceProxy (Code) | | This ServiceProxy class enables the saving and opening of files on a local
filesystem.
Copyright (c) Xoetrope Ltd., 2001-2006, This software is licensed under
the GNU Public License (GPL), please see license.txt for more details. If
you make commercial use of this software you must purchase a commercial
license from Xoetrope.
$Revision: 1.13 $
|
ARG_ERROR_CANNOT_OPEN_FILE | final public static String ARG_ERROR_CANNOT_OPEN_FILE(Code) | | |
ARG_ERROR_FILE_EXISTS | final public static String ARG_ERROR_FILE_EXISTS(Code) | | |
ARG_NAME_CONTENTS | final public static String ARG_NAME_CONTENTS(Code) | | The contents to be written if saving or returned if opening
|
ARG_NAME_DIR | final public static String ARG_NAME_DIR(Code) | | The path to the directory where the file is being written or opened
|
ARG_NAME_FILENAME | final public static String ARG_NAME_FILENAME(Code) | | The name of the file being written or opened
|
ARG_NAME_MODE | final public static String ARG_NAME_MODE(Code) | | The mode of the call. Either ARG_VALUE_OPEN or ARG_VALUE_SAVE
|
ARG_NAME_OVERWRITE | final public static String ARG_NAME_OVERWRITE(Code) | | Set if a file with the same name exists and should be overwritten
|
ARG_VALUE_OPEN | final public static String ARG_VALUE_OPEN(Code) | | Apply to the ARG_NAME_MODE parameter if opening the file
|
ARG_VALUE_OVERWRITE_YES | final public static String ARG_VALUE_OVERWRITE_YES(Code) | | Apply to the ARG_NAME_OVERWRITE parameter if the file is to be overwritten
|
ARG_VALUE_SAVE | final public static String ARG_VALUE_SAVE(Code) | | Apply to the ARG_NAME_MODE parameter if saving the file
|
call | public Object call(String method, ServiceContext context) throws ServiceProxyException(Code) | | If the mode parameter is 'save' call the saveFile function. If the call
mode parameter is 'open' open the file and return its contents
the result of the call Parameters: method - the name of the service being called Parameters: context - The ServiceContext contain pass and return parameters throws: net.xoetrope.optional.service.ServiceProxyException - Throw an exception if there is a problem with the call |
openFile | protected String openFile(String name, ServiceProxyArgs args)(Code) | | Open the file, read it and return its contents
Parameters: name - The path to the file to be read The contents of the file |
saveFile | public void saveFile(ServiceContext context, String name, String contents, String overwrite)(Code) | | Save the file to the path specified by the name parameter
Parameters: name - The path to the file Parameters: contents - The contents to be written to the file |
|
|