Interface WindowsFiles

All Superinterfaces:
Files, NativeIntegration
All Known Implementing Classes:
DefaultWindowsFiles

public interface WindowsFiles extends Files, NativeIntegration
Functions to query files on a Windows file system.
  • Method Summary

    Modifier and Type
    Method
    Description
    stat(File file)
    Returns basic information about the given file.
    stat(File file, boolean linkTarget)
    Returns basic information about the given file.

    Methods inherited from interface net.rubygrapefruit.platform.file.Files

    listDir, listDir
  • Method Details

    • stat

      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
      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.
      FilePermissionException - When the user has insufficient permissions to query the file information
    • stat

      WindowsFileInfo stat(File file, boolean linkTarget) throws NativeException
      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.
      FilePermissionException - When the user has insufficient permissions to query the file information