インタフェース
java.nio.file.attribute.FileAttributeの使用
-
FileAttributeを使用しているパッケージ パッケージ 説明 java.nio.channels 入出力操作を実行できるエンティティ(ファイル、ソケットなど)への接続を表すチャネルや、多重化された非ブロック入出力操作用のセレクタを定義します。java.nio.file ファイル、ファイル属性、およびファイル・システムにアクセスするためのJava仮想マシン用のインタフェースとクラスを定義します。java.nio.file.attribute ファイルおよびファイル・システム属性へのアクセスを提供するインタフェースとクラスです。java.nio.file.spi java.nio.file
パッケージのサービス・プロバイダ・クラス。 -
-
java.nio.channelsでのFileAttributeの使用
FileAttribute型のパラメータを持つjava.nio.channelsのメソッド 修飾子と型 メソッド 説明 static AsynchronousFileChannel
AsynchronousFileChannel. open(Path file, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)
読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。static FileChannel
FileChannel. open(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
ファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。 -
java.nio.fileでのFileAttributeの使用
FileAttribute型のパラメータを持つjava.nio.fileのメソッド 修飾子と型 メソッド 説明 static Path
Files. createDirectories(Path dir, FileAttribute<?>... attrs)
存在しないすべての親ディレクトリをまず作成することで、ディレクトリを作成します。static Path
Files. createDirectory(Path dir, FileAttribute<?>... attrs)
新しいディレクトリを作成します。static Path
Files. createFile(Path path, FileAttribute<?>... attrs)
新しい空のファイルを作成し、ファイルがすでに存在する場合は失敗します。static Path
Files. createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs)
ターゲットへのシンボリック・リンクを作成します(オプションの操作)。static Path
Files. createTempDirectory(String prefix, FileAttribute<?>... attrs)
デフォルトの一時ファイル・ディレクトリで新しいディレクトリを生成し、その名前には、指定された接頭辞が使用されます。static Path
Files. createTempDirectory(Path dir, String prefix, FileAttribute<?>... attrs)
指定されたディレクトリで新しいディレクトリを生成し、その名前には、指定された接頭辞が使用されます。static Path
Files. createTempFile(String prefix, String suffix, FileAttribute<?>... attrs)
指定された接頭辞と接尾辞をファイル名の生成に使用して、デフォルトの一時ファイル・ディレクトリに空のファイルを生成します。static Path
Files. createTempFile(Path dir, String prefix, String suffix, FileAttribute<?>... attrs)
指定されたディレクトリで新しい空のファイルを生成し、その名前には、指定された接頭辞および接尾辞の文字列が使用されます。static SeekableByteChannel
Files. newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。SeekableByteChannel
SecureDirectoryStream. newByteChannel(T path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
このディレクトリ内のファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。 -
java.nio.file.attributeでのFileAttributeの使用
FileAttributeを返すjava.nio.file.attributeのメソッド 修飾子と型 メソッド 説明 static FileAttribute<Set<PosixFilePermission>>
PosixFilePermissions. asFileAttribute(Set<PosixFilePermission> perms)
指定されたファイル権限のコピーをカプセル化する(createFile
メソッドまたはcreateDirectory
メソッドに渡すのに適している)FileAttribute
を作成します。 -
java.nio.file.spiでのFileAttributeの使用
FileAttribute型のパラメータを持つjava.nio.file.spiのメソッド 修飾子と型 メソッド 説明 abstract void
FileSystemProvider. createDirectory(Path dir, FileAttribute<?>... attrs)
新しいディレクトリを作成します。void
FileSystemProvider. createSymbolicLink(Path link, Path target, FileAttribute<?>... attrs)
ターゲットへのシンボリック・リンクを作成します。AsynchronousFileChannel
FileSystemProvider. newAsynchronousFileChannel(Path path, Set<? extends OpenOption> options, ExecutorService executor, FileAttribute<?>... attrs)
読み込みまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするための非同期のファイル・チャネルを返します。abstract SeekableByteChannel
FileSystemProvider. newByteChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
ファイルを開くか作成し、そのファイルにアクセスするためのシーク可能なバイト・チャネルを返します。FileChannel
FileSystemProvider. newFileChannel(Path path, Set<? extends OpenOption> options, FileAttribute<?>... attrs)
読み取りまたは書き込み(あるいはその両方)用のファイルを開くか作成し、そのファイルにアクセスするためのファイル・チャネルを返します。
-