jp.hrtdotnet.java.io
クラス HDirectory

java.lang.Object
  拡張java.io.File
      拡張jp.hrtdotnet.java.io.HDirectory
すべての実装インタフェース:
java.lang.Comparable, java.io.Serializable

public class HDirectory
extends java.io.File

ディレクトリを操作するクラスです。 このクラスを利用してファイルを操作することは禁止されています。

導入されたバージョン:
2.0
作成者:
hrtdotnet.jp
http://www.hrtdotnet.jp/
関連項目:
直列化された形式

フィールドの概要
 
クラス java.io.File から継承したフィールド
pathSeparator, pathSeparatorChar, separator, separatorChar
 
コンストラクタの概要
HDirectory(java.lang.String directoryPath)
          コンストラクタ。
 
メソッドの概要
static boolean checkDirectoryName(java.lang.String directory)
          ディレクトリパスの正当性の判定をします。
 boolean createNewFile()
          推奨されていません。 このメソッドは利用してはなりません。
 
クラス java.io.File から継承したメソッド
canRead, canWrite, compareTo, compareTo, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getName, getParent, getParentFile, getPath, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setLastModified, setReadOnly, toString, toURI, toURL
 
クラス java.lang.Object から継承したメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

HDirectory

public HDirectory(java.lang.String directoryPath)
           throws java.io.IOException
コンストラクタ。

パラメータ:
directoryPath - ディレクトリパス
例外:
java.io.IOException - directoryPathがファイルである、またはディレクトリとして不正なパスである場合
導入されたバージョン:
2.0
メソッドの詳細

checkDirectoryName

public static boolean checkDirectoryName(java.lang.String directory)
ディレクトリパスの正当性の判定をします。 ディレクトリパスが以下の条件にマッチする場合、不正であると判断されます。
  1. null文字列
  2. 長さが0バイト(空文字)、256バイト以上
  3. 大小区別せずに頭文字が「CON.」「AUX.」「PRN.」「NUL.」から始まる
  4. 拡張子を除いた名前が「COM[0-9]」「LPT[0-9]」のもの([0-9]は0?9のどれか)
  5. 「\」「:」「*」「?」「"」「<」「>」「|」を含む
  6. 末尾が「.」(ドット)

パラメータ:
directory - ディレクトリパス
戻り値:
正当であればtrue、それ以外はfalse
導入されたバージョン:
2.0

createNewFile

public boolean createNewFile()
                      throws java.io.IOException
推奨されていません。 このメソッドは利用してはなりません。

このメソッドは利用してはなりません。 利用した場合、File#createNewFile()と同じ処理を行います。

例外:
java.io.IOException
導入されたバージョン:
2.0


Copyright © 2011. All Rights Reserved.