Package net.rubygrapefruit.platform.internal

# Class DefaultWindowsFiles

java.lang.Object
net.rubygrapefruit.platform.internal.AbstractFiles
net.rubygrapefruit.platform.internal.DefaultWindowsFiles

All Implemented Interfaces:
  `Files`, `NativeIntegration`, `WindowsFiles`

public class DefaultWindowsFiles extends AbstractFiles implements WindowsFiles

## Constructor Summary

Constructors
Constructor
Description
`DefaultWindowsFiles()`

## Method Summary

Modifier and Type
Method
Description
`List<? extends DirEntry>`
`listDir(File dir)`
Lists the entries of the given directory.
`List<? extends DirEntry>`
`listDir(File dir, boolean linkTarget)`
Lists the entries of the given directory.
`WindowsFileInfo`
`stat(File file)`
Returns basic information about the given file.
`FileInfo`
`stat(File file, boolean linkTarget)`
Returns basic information about the given file.

### Methods inherited from class net.rubygrapefruit.platform.internal.AbstractFiles

`listDirFailure`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DefaultWindowsFiles

public DefaultWindowsFiles()

## Method Details

### stat

public WindowsFileInfo stat(File file) throws NativeException
Description copied from interface: `WindowsFiles`
Returns basic information about the given file. Returns whatever file details can be efficiently calculated in a single system call, which is more efficient that querying these details separately.

When the file references a symlink, details about the symlink is returned, not the target of the symlink.

Specified by:
  `stat` in interface `Files`
Specified by:
  `stat` in interface `WindowsFiles`
Parameters:
  `file` - The path of the file to get details of. Follows symlinks to the parent directory of this file.
Returns:
  Details of the file. Returns details with type `FileInfo.Type.Missing` for a file that does not exist.
Throws:
  `NativeException` - On failure to query the file information.

### stat

public FileInfo stat(File file, boolean linkTarget) throws NativeException
Description copied from interface: `Files`
Returns basic information about the given file. Returns whatever file details can be efficiently calculated in a single system call, which is more efficient that querying these details separately.

Specified by:
  `stat` in interface `Files`
Parameters:
  `file` - The path of the file to get details of. Follows symlinks to the parent directory of this file.
  `linkTarget` - When true and the file is a symlink, return details of the target of the symlink instead of details of the symlink itself.
Returns:
  Details of the file. Returns details with type `FileInfo.Type.Missing` for a file that does not exist.
Throws:
  `NativeException` - On failure to query the file information.

### listDir

public List<? extends DirEntry> listDir(File dir) throws NativeException
Description copied from interface: `Files`
Lists the entries of the given directory.

When a directory entry is a symlink, details about the symlink is returned, not the target of the symlink.

Specified by:
  `listDir` in interface `Files`
Parameters:
  `dir` - The path of the directory to list. Follows symlinks to this directory.
Throws:
  `NativeException` - On failure.

### listDir

public List<? extends DirEntry> listDir(File dir, boolean linkTarget) throws NativeException
Description copied from interface: `Files`
Lists the entries of the given directory.

Specified by:
  `listDir` in interface `Files`
Parameters:
  `dir` - The path of the directory to list. Follows symlinks to this directory.
  `linkTarget` - When true and a directory entry is a symlink, return details of the target of the symlink instead of details of the symlink itself.
Throws:
  `NativeException` - On failure.