QPathExtensions extension

String extensions for file paths

Provides convenient extension methods on String paths for getting file information without creating File objects.

on

Properties

fileBaseName → String?

Available on String, provided by the QPathExtensions extension

Gets the file name without extension from this path
no setter
fileCategory → String?

Available on String, provided by the QPathExtensions extension

Gets the file category
no setter
fileDirectory → String?

Available on String, provided by the QPathExtensions extension

Gets the directory path from this file path
no setter
fileExists → bool

Available on String, provided by the QPathExtensions extension

Checks if the file exists
no setter
fileExtension → String?

Available on String, provided by the QPathExtensions extension

Gets the file extension from this path (without dot)
no setter
fileExtensionWithDot → String?

Available on String, provided by the QPathExtensions extension

Gets the file extension with dot
no setter
fileHumanSize → String?

Available on String, provided by the QPathExtensions extension

Gets human-readable file size
no setter
fileMimeType → String?

Available on String, provided by the QPathExtensions extension

Gets the MIME type for this file path based on extension
no setter
fileName → String?

Available on String, provided by the QPathExtensions extension

Gets the file name from this path (including extension)
no setter
fileSize → int?

Available on String, provided by the QPathExtensions extension

Gets file size in bytes
no setter
isArchiveFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents an archive
no setter
isAudioFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents an audio file
no setter
isCodeFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents a code file
no setter
isDocumentFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents a document
no setter
isImageFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents an image
no setter
isPresentationFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents a presentation
no setter
isSpreadsheetFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents a spreadsheet
no setter
isValidFilePath → bool

Available on String, provided by the QPathExtensions extension

Validates if this is a valid file path
no setter
isVideoFile → bool

Available on String, provided by the QPathExtensions extension

Checks if this file path represents a video
no setter
sanitizedFileName → String

Available on String, provided by the QPathExtensions extension

Sanitizes this filename
no setter

Methods

sanitizeFilePath({String replacement = '_'}) → String

Available on String, provided by the QPathExtensions extension

Creates a sanitized version of this file path
toFile() → File

Available on String, provided by the QPathExtensions extension

Converts this path to a File object