# plugins.finalcutpro.watchfolders.media.MediaFolder

Final Cut Pro Media Watch Folder Plugin.


# API Overview

Functions - API calls offered directly by the extension

  • freeze

Constructors - API calls which return an object, typically one that offers API methods

  • new
  • thaw

Methods - API calls which can only be made on an object returned by a constructor

  • addIncoming
  • addReady
  • checkNotifications
  • destroy
  • doDeleteImportedFiles
  • doImportNext
  • doRestoreOriginalPasteboard
  • doRevealInFinder
  • doTagFiles
  • handleImport
  • importAll
  • importFiles
  • importFirst
  • importTag
  • init
  • processFiles
  • removeFile
  • save
  • skipAll
  • skipOne
  • updateIncomingNotification
  • updateReadyNotification

# API Documentation

# Functions

# freeze

Signature plugins.finalcutpro.watchfolders.media.MediaFolder.freeze(mediaFolder) -> table
Type Function
Description Returns a table with the details of the MediaFolder, ready to be stored. It can be brought back via the MediaFolder.thaw(...) function.
Parameters
  • mediaFolder - The MediaFolder to freeze.
Returns
  • A table of details.
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 85

# Constructors

# new

Signature plugins.finalcutpro.watchfolders.media.MediaFolder.new(mod, path, videoTag, audioTag, imageTag) -> MediaFolder
Type Constructor
Description Creates a new Media Folder.
Parameters
  • mod - The module.
  • path - Path to the Media Folder.
  • videoTag - Video Tag as String
  • audioTag - Audio Tag as String
  • imageTag - Image Tag as String
Returns
  • A new MediaFolder object.
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 39

# thaw

Signature plugins.finalcutpro.watchfolders.media.MediaFolder.thaw(details) -> MediaFolder
Type Constructor
Description Creates a new MediaFolder based on the details provided. The details have typically come from a call to MediaFolder.freeze(...)
Parameters
  • details - The table with details of the media folder when it was frozen.
Returns
  • A new MediaFolder instance with the specified details.
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 67

# Methods

# addIncoming

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:addIncoming(file) -> nil
Type Method
Description Adds the file to the 'incoming' list and updates the notification.
Parameters
  • file - The file to add.
Returns
  • nil
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 301

# addReady

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:addReady(file) -> nil
Type Method
Description Adds the file to the 'ready' list and updates the notifications.
Parameters
  • file - The file to add.
Returns
  • nil
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 316

# checkNotifications

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:checkNotifications() -> none
Type Method
Description Checks Notifications.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 234

# destroy

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:destroy()
Type Method
Description Destroys the MediaFolder. It should not be used after this is called.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 758

# doDeleteImportedFiles

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:doDeleteImportedFiles(context) -> nil
Type Method
Description Checks if we are deleting after import, and if so schedules them to be deleted.
Parameters
  • files - a table of file paths.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 590

# doImportNext

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:doImportNext() -> nil
Type Method
Description Imports the next file in the Media Folder.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 622

# doRestoreOriginalPasteboard

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:doRestoreOriginalPasteboard(context) -> nil
Type Method
Description Restore original Pasteboard contents after 2 seconds.
Parameters
  • context - The context.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 567

# doRevealInFinder

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:doRevealInFinder() -> cp.rx.go.Statement
Type Method
Description Returns a Statement that will reveal the MediaFolder path in the Finder.
Parameters
  • None
Returns
  • Statement
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 790

# doTagFiles

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:doTagFiles(files) -> nil
Type Method
Description Tags a table of files.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 145

# handleImport

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:handleImport(notification) -> nil
Type Method
Description Handles the importing of a file.
Parameters
  • notification - The notification object.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 436

# importAll

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:importAll() -> nil
Type Method
Description Begins importing all ready files, removing them from the ready queue.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 483

# importFiles

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:importFiles(files) -> nil
Type Method
Description Requests for the files to be imported.
Parameters
  • files - a table/list of files to be imported.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 551

# importFirst

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:importFirst() -> nil
Type Method
Description Begins importing the first ready file, removing it from the ready queue.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 501

# importTag

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:importTag() -> string
Type Method
Description Returns the import tag.
Parameters
  • None
Returns
  • The import tag as a string.
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 368

# init

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:init() -> nil
Type Method
Description Initialises the folder, getting any watchers, notifications, etc. running.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 105

# processFiles

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:processFiles(files, fileFlags) -> none
Type Method
Description Process files.
Parameters
  • files - A table of files to process.
  • fileFlags - A table of file flags.
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 251

# removeFile

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:removeFile(file) -> MediaFolder
Type Method
Description Removes the file from any queues it might be in, updating relevant notifications.
Parameters
  • file - the full path to the file.
Returns
  • The MediaFolder instance
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 279

# save

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:save()
Type Method
Description Ensures the MediaFolder is saved.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 745

# skipAll

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:skipAll() -> nil
Type Method
Description Skip all files in the Media Folder.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 519

# skipOne

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:skipOne() -> nil
Type Method
Description Skip one file in the Media Folder.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 534

# updateIncomingNotification

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:updateIncomingNotification() -> nil
Type Method
Description Updates the 'incoming' notification based on the current set of files in the incoming queue.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 336

# updateReadyNotification

Signature plugins.finalcutpro.watchfolders.media.MediaFolder:updateReadyNotification() -> nil
Type Method
Description Updates the 'ready' notification based on the current set of files in the ready queue.
Parameters
  • None
Returns
  • None
Notes None
Examples None
Source src/plugins/finalcutpro/watchfolders/media/MediaFolder.lua line 381