Sha256: a8463071a7ee77e7ee826997ecab823aedf4e19e39a99b81e8f564d723978f33

Contents?: true

Size: 1.27 KB

Versions: 1

Compression:

Stored size: 1.27 KB

Contents

# file_type_detector

**file_type_detector** is a Ruby gem that allows you to determine the type of files based on their extension or content.

## Installation

Add this gem to your Gemfile and run `bundle install`:

```ruby
gem 'file_type_detector'
```

Alternatively, install it directly using the gem command:

```ruby
gem install file_type_detector
```

## Usage

To use the gem, you need to create an instance of FileTypeDetector::FileTypeDetector, specifying the path to the file as the constructor argument. Then call the detect method to determine the file type.

```ruby
require 'file_type_detector'

detector = FileTypeDetector::FileTypeDetector.new('path/to/your/file.pdf')
puts detector.detect
```
Please replace `"path/to/your/file.pdf"` with the path to your file that you want to check.

## Supported File Types
The gem provides support for detecting the following file types:

- PDF
- PNG

## Contributing

You can contribute to the development of the gem by creating new detectors for other file types and improving existing code. Report bugs and submit feature requests through the [GitHub repository](https://github.com/synthematik/file_type_detector_gem).

## License

This gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
file_type_detector_sfedu-0.1.1 README.md