FileService class

A service for handling file system operations.

This service provides utilities for:

  • Downloading and saving files
  • Managing directories
  • Converting file formats
  • Sanitizing file names

Constructors

FileService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cleanDirectory(String directory) Future<void>
Cleans a directory by removing all its contents.
convertPdfToSvg(String pdfPath, String outputDirectory) Future<void>
Converts a PDF file to SVG format using the pdf2svg command-line tool.
downloadAndSaveFile(String url, String outputPath, String fileName, String extension) Future<void>
Downloads a file from a URL and saves it to the specified path.
ensureDirectoryExists(String directory) Future<void>
Ensures that a directory exists, creating it if necessary.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
sanitizeFileName(String fileName) String
Sanitizes a file name by removing or replacing invalid characters.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited