Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

function MatchFile(FileName) return true end

Expand
titleClick on MatchRules.lua to see where we need to alter the code

Navigate to MatchRules.lua in the project tree. This is the function we need to alter:

Code Block
languagelua
function MatchFile(FileName)
   return true
end

The file reader component is deliberately simple and uses /wiki/spaces/IXB/pages/3181903910 to make it more obvious how to modify the code to meet new needs. So this is what we are starting off with. We need this function to return true when the matching criteria are met.https://bitbucket.org/interfaceware/fromfile/src/main/MatchRules. lua

Code Block
languagelua
Expand
titleLet's extract the filename so we can look at it:

Change the matching to add in two lines so we can see the filenames we need to filter on.

Code Block
languagelua
function MatchFile(FileName)
   local JustFileName = FILfilename(FileName)
   trace(JustFileName)
   return true
end

These are the concepts we have used:

...