packages/cgjs/cg.js
function getProgramDir(programFile) {
    const info = programFile.query_info('standard::', Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, null);
    if (info.get_is_symlink()) {
      const symlinkFile = programFile.get_parent().resolve_relative_path(info.get_symlink_target());
      return symlinkFile.get_parent();
    } else {
      return programFile.get_parent();
    }
  }
function getProgramDir(programFile) {
    const info = programFile.query_info('standard::', Gio.FileQueryInfoFlags.NOFOLLOW_SYMLINKS, null);
    if (info.get_is_symlink()) {
      const symlinkFile = programFile.get_parent().resolve_relative_path(info.get_symlink_target());
      return symlinkFile.get_parent();
    } else {
      return programFile.get_parent();
    }
  }
function getProgramDir ( programFile ) { const info = programFile . query_info ( 'standard::' , Gio . FileQueryInfoFlags . NOFOLLOW_SYMLINKS , null ) ; if ( info . get_is_symlink ( ) ) { const symlinkFile = programFile . get_parent ( ) . resolve_relative_path ( info . get_symlink_target ( ) ) ; return symlinkFile . get_parent ( ) ; } else { return programFile . get_parent ( ) ; } }
basic utility for this scope
basic utility for this scope