jp.co.quickbinder.api.storage
クラス QBStorage

java.lang.Object
  上位を拡張 jp.co.quickbinder.api.storage.QBStorage

public class QBStorage
extends Object

 QuickBinderのStorage操作クラス
 

導入されたバージョン:
7.2

入れ子のクラスの概要
static class QBStorage.RootType
           「getRootPath」の引数で使用するenum enumのメンバーはStorageの「qbs/[groupid]/」以降のディレクトリに対応
 
メソッドの概要
static boolean copy(String fromPath, String toPath, String fromFileNm, String toFileNm)
           指定のパスにあるファイルを指定のパスに指定のファイル名でコピーする ファイルの存在チェック等のチェック処理はコール元で行ってください。
static String getRootPath(QBStorage.RootType type)
           QuickBinderのストレージのパスを取得する RootTypeに対応したパスを返却します。
static boolean remove(String path, String fileNm)
           指定のファイルの削除
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

メソッドの詳細

getRootPath

public static String getRootPath(QBStorage.RootType type)
                          throws Exception
 QuickBinderのストレージのパスを取得する
 RootTypeに対応したパスを返却します。
 

パラメータ:
type - qbs/[groupid]/以降のパスに対応する「RootType」を指定する
DEFAULTを指定した場合、「qbs/[groupid]/」を返却します。
戻り値:
パス
例外:
Exception

copy

public static boolean copy(String fromPath,
                           String toPath,
                           String fromFileNm,
                           String toFileNm)
                    throws Exception
 指定のパスにあるファイルを指定のパスに指定のファイル名でコピーする
 ファイルの存在チェック等のチェック処理はコール元で行ってください。
 コピー先に同じファイルがある場合上書きされます。
 コピー先のパスがない場合作成してコピーを行います。
 

パラメータ:
fromPath - コピー元のパス(ファイル名は含まない,文字の最後に「/」をつける)
toPath - コピー先のパス(ファイル名は含まない,文字の最後に「/」をつける)
fromFileNm - コピー元のファイル名
toFileNm - コピー先のファイル名
戻り値:
true:成功 false:失敗
例外:
Exception

remove

public static boolean remove(String path,
                             String fileNm)
                      throws Exception
 指定のファイルの削除
 

パラメータ:
path - 削除するファイルのパス(ファイル名は含まない、文字の最後に「/」をつける)
fileNm - 削除するファイル名
戻り値:
true:成功 false:失敗
例外:
Exception