jp.hrtdotnet.java.io
クラス HDirectory

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

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 から継承されたメソッド
canExecute, canRead, canWrite, compareTo, compareTo, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, 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.File 内の createNewFile
例外:
java.io.IOException
導入されたバージョン:
2.0


Copyright © 2011. All Rights Reserved.