<commit_before>const objc = require('../src/index');

const {
  NSFileManager,
  NSString,
  NSURL
} = objc;



const FileManagerDelegate = objc.createClass('FileManagerDelegate', 'NSObject', {
  'fileManager:shouldMoveItemAtPath:toPath:': (self, cmd, fileManager, srcPath, dstPath) => {
    return 1;
  },

  _encodings: {
    'fileManager:shouldMoveItemAtPath:toPath:': ['c40', ['@0', ':8', '@16', '@24', '@32']]
  }
});




const fm = NSFileManager.new();
const delegate = FileManagerDelegate.new();
fm.setDelegate_(delegate);


const pathA = 'x.txt';
const pathB = 'y.txt';

// create file

const data = objc.ns('hello world').dataUsingEncoding_(4);
fm.createFileAtPath_contents_attributes_(pathA, data, null);


// move file<commit_msg>update the delegate example<commit_after>const objc = require('../src/index');

const {
  NSFileManager,
  NSString,
  NSURL
} = objc;



const FileManagerDelegate = objc.createClass('FileManagerDelegate', 'NSObject', {
  'fileManager:shouldMoveItemAtPath:toPath:': (self, cmd, fileManager, srcPath, dstPath) => {
    console.log('-[NSFileManagerDelegate fileManager:shouldMoveItemAtPath:toPath:]');
    return 1;
  },

  _encodings: {
    'fileManager:shouldMoveItemAtPath:toPath:': ['c40', ['@0', ':8', '@16', '@24', '@32']]
  }
});




const fm = NSFileManager.new();
const delegate = FileManagerDelegate.new();
fm.setDelegate_(delegate);


const pathA = 'x.txt';
const pathB = 'y.txt';

// create file

const data = objc.ns('hello world').dataUsingEncoding_(4);
fm.createFileAtPath_contents_attributes_(pathA, data, null);


// move file
{'fraction_non_alphanumeric': 0.1706700379266751, 'fraction_numerical': 0.015170670037926675, 'mean_word_length': 5.088461538461538, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2316739', 'n_tokens_mistral': 568, 'n_tokens_neox': 533, 'n_words': 108}