Class List Method List File List

# Class: Vertx::FileProps

Inherits:
  Object
  - Object
  - Vertx::FileProps
  show all
Defined in:
  src/main/ruby_scripts/core/file_system.rb

## Overview

Represents the properties of a file on the file system

Author:

- Tim Fox

## Instance Method Summary (collapse)

- - (Time) creation_time
  The creation time of the file.
- - (Boolean) directory?
  Is the file a directory?.
- - (Time) last_access_time
  The last access time of the file.
- - (Time) last_modified_time
  The last modified time of the file.
- - (Boolean) other?
  Is the file some other file type?.
- - (Boolean) regular_file?
  Is it a regular file?.
- - (FixNum) size
  The size of the file, in bytes.
- - (Boolean) symbolic_link?
  Is it a symbolic link?.

## Instance Method Details

### - (`Time`) creation_time

The creation time of the file.

Returns:

- (`Time`) —
  The creation time of the file.

    29
    30
    31
    # File 'src/main/ruby_scripts/core/file_system.rb', line 29

    def creation_time
      Time.at(@j_props.creationTime.getTime() / 1000)
    end

### - (`Boolean`) directory?

Is the file a directory?

Returns:

- (`Boolean`) —
  Is the file a directory?

    44
    45
    46
    # File 'src/main/ruby_scripts/core/file_system.rb', line 44

    def directory?
      @j_props.isDirectory
    end

### - (`Time`) last_access_time

The last access time of the file.

Returns:

- (`Time`) —
  The last access time of the file.

    34
    35
    36
    # File 'src/main/ruby_scripts/core/file_system.rb', line 34

    def last_access_time
      Time.at(@j_props.lastAccessTime.getTime() / 1000)
    end

### - (`Time`) last_modified_time

The last modified time of the file.

Returns:

- (`Time`) —
  The last modified time of the file.

    39
    40
    41
    # File 'src/main/ruby_scripts/core/file_system.rb', line 39

    def last_modified_time
      Time.at(@j_props.lastModifiedTime.getTime() / 1000)
    end

### - (`Boolean`) other?

Is the file some other file type?

Returns:

- (`Boolean`) —
  Is the file some other file type?

    49
    50
    51
    # File 'src/main/ruby_scripts/core/file_system.rb', line 49

    def other?
      @j_props.isOther
    end

### - (`Boolean`) regular_file?

Is it a regular file?

Returns:

- (`Boolean`) —
  Is it a regular file?

    54
    55
    56
    # File 'src/main/ruby_scripts/core/file_system.rb', line 54

    def regular_file?
      @j_props.isRegularFile
    end

### - (`FixNum`) size

The size of the file, in bytes.

Returns:

- (`FixNum`) —
  The size of the file, in bytes.

    64
    65
    66
    # File 'src/main/ruby_scripts/core/file_system.rb', line 64

    def size
      @j_props.size
    end

### - (`Boolean`) symbolic_link?

Is it a symbolic link?

Returns:

- (`Boolean`) —
  Is it a symbolic link?

    59
    60
    61
    # File 'src/main/ruby_scripts/core/file_system.rb', line 59

    def symbolic_link?
      @j_props.isSymbolicLink
    end