why does a function have strike through in the text

437 Views Asked by At

the addFile part is shown with strikethrough text. not sure why. is seems to be working. should I change something? looks like this addfile with strikethrough

been using this for a few years. moves recording for my class to their respective folders by the prefix on the file name. works great not sure why this kind of functionality is not built in yet.

function MoveRecordingsToFolders()
{
  
  var folder = DriveApp.getFolderById('folderid_is_placed_here'); // folder where recordinds are dumpped about 73 long 
  var files = folder.getFiles();
  while (files.hasNext())
  {
    file = files.next();
    if (file.getName().indexOf("CAD242 #")== 0)
    {
      DriveApp.getFolderById('folderid_of_destination').addFile(file); //
      file
        .getParents()
        .next()
        .removeFile(file);
    }
  }
}

there are no issues yet just wonder if there will be.

1

There are 1 best solutions below

0
Wicket On

Google Apps Script, web editor / IDE, uses the strike-through style on deprecated methods. In this case, Folder.addFile is deprecated.

This was announced in the blog post, Simplifying Google Drive’s folder structure and sharing models and on the release note dated July 27, 2020, and it's included in the section of deprecated methods on the Folder class page.

Deprecated methods might still work for a while, but they might stop working suddenly, so it's better to refactor your script to avoid using these methods.

Related