/** * Get a File if it exists. If not, get a File that can be written to. * Use the standard policy to decide where to place it. * <p/> * Things are a bit complicated, because in order to guarentee a file in an arbitrary * location can be written to, we have to try to open it as a FileOutputStream. * If we do, we dont want to open it twice, so we return a WriteableFile that contains an * opened FileOutputStream. * If it already exists, or we get it from cache, we dont need to open it. * <p/> * In any case, you must call WriteableFile.close() to make sure its closed. * * @param fileLocation normal file location * @return WriteableFile holding the writeable File and a possibly opened FileOutputStream (append false) */ static public File getFileStandardPolicy(String fileLocation) { return getFile(fileLocation, standardPolicy); }
/** * Get a File if it exists. If not, get a File that can be written to. * Use the standard policy to decide where to place it. * <p> * Things are a bit complicated, because in order to guarantee a file in * an arbitrary location can be written to, we have to try to open it as a * FileOutputStream. If we do, we don't want to open it twice, * so we return a WriteableFile that contains an opened FileOutputStream. * If it already exists, or we get it from cache, we don't need to open it. * <p> * In any case, you must call WriteableFile.close() to make sure its closed. * * @param fileLocation normal file location * @return WriteableFile holding the writeable File and a possibly opened FileOutputStream (append false) */ static public File getFileStandardPolicy(String fileLocation) { return getFile(fileLocation, standardPolicy); }
/** * Get a File if it exists. If not, get a File that can be written to. * Use the standard policy to decide where to place it. * <p/> * Things are a bit complicated, because in order to guarantee a file in * an arbitrary location can be written to, we have to try to open it as a * FileOutputStream. If we do, we don't want to open it twice, * so we return a WriteableFile that contains an opened FileOutputStream. * If it already exists, or we get it from cache, we don't need to open it. * <p/> * In any case, you must call WriteableFile.close() to make sure its closed. * * @param fileLocation normal file location * @return WriteableFile holding the writeable File and a possibly opened FileOutputStream (append false) */ static public File getFileStandardPolicy(String fileLocation) { return getFile(fileLocation, standardPolicy); }