docs: static File parse(final File pPath) throws IOException {
          if (!pPath.getName().endsWith(".lnk")) {
              return pPath;
          }
  
          File result = pPath;
  
          LittleEndianDataInputStream in = new LittleEndianDataInputStream(new BufferedInputStream(new FileInputStream(pPath)));
          try {
              byte[] magic = new byte[4];
              in.readFully(magic);
  
              byte[] guid = new byte[16];
              in.readFully(guid);
  
              if (!(Arrays.equals(LNK_MAGIC, magic) && Arrays.equals(LNK_GUID, guid))) {
                  //System.out.println("Not a symlink");
                  // Not a symlink
                  return pPath;
              }
  
              // Get the flags
              int flags = in.readInt();
              //System.out.println("flags: " + Integer.toBinaryString(flags & 0xff));
  
              // Get to the file settings
              /*int attributes = */in.readInt();
  
              // File attributes
              // 0 Target is read only.
              // 1 Target is hidden.
              // 2 Target is a system file.
              // 3 Target is a volume label. (Not possible)
              // 4 Target is a directory.
              // 5 Target has been modified since last backup. (archive)
              // 6 Target is encrypted (NTFS EFS)
              // 7 Target is Normal??
              // 8 Target is temporary.
              // 9 Target is a sparse file.
              // 10 Target has reparse point data.
              // 11 Target is compressed.
              // 12 Target is offline.
              //System.out.println("attributes: " + Integer.toBinaryString(attributes));
              // NOTE: Cygwin .lnks are not directory links, can't rely on this.. :-/
  
              in.skipBytes(48); // TODO: Make sense of this data...
  
              // Skipped data:
              // long time 1 (creation)
              // long time 2 (modification)
              // long time 3 (last access)
              // int file length
              // int icon number
              // int ShowVnd value
              // int hotkey
              // int, int - unknown: 0,0
  
              // If the shell settings are present, skip them
              if ((flags & FLAG_ITEM_ID_LIST) != 0) {
                  // Shell Item Id List present
                  //System.out.println("Shell Item Id List present");
                  int shellLen = in.readShort(); // Short
                  //System.out.println("shellLen: " + shellLen);
  
                  // TODO: Probably need to parse this data, to determine
                  // Cygwin folders...
  
                  /*
                  int read = 2;
                  int itemLen = in.readShort();
                  while (itemLen > 0) {
                      System.out.println("--> ITEM: " + itemLen);
  
                      BufferedReader reader = new BufferedReader(new InputStreamReader(new SubStream(in, itemLen - 2)));
                      //byte[] itemBytes = new byte[itemLen - 2]; // NOTE: Lenght included
                      //in.readFully(itemBytes);
  
                      String item = reader.readLine();
                      System.out.println("item: \"" + item + "\"");
  
                      itemLen = in.readShort();
                      read += itemLen;
                  }
  
                  System.out.println("read: " + read);
                  */
  
                  in.skipBytes(shellLen);
              }
  
              if ((flags & FLAG_FILE_LOC_INFO) != 0) {
                  // File Location Info Table present
                  //System.out.println("File Location Info Table present");
  
                  // 0h 1 dword This is the total length of this structure and all following data
                  // 4h 1 dword This is a pointer to first offset after this structure. 1Ch
                  // 8h 1 dword Flags
                  // Ch 1 dword Offset of local volume info
                  // 10h 1 dword Offset of base pathname on local system
                  // 14h 1 dword Offset of network volume info
                  // 18h 1 dword Offset of remaining pathname
  
                  // Flags:
                  // Bit Meaning
                  // 0 Available on a local volume
                  // 1 Available on a network share
                  // TODO: Make sure the path is on a local disk, etc..
  
                  int tableLen = in.readInt(); // Int
                  //System.out.println("tableLen: " + tableLen);
  
                  in.readInt(); // Skip
  
                  int locFlags = in.readInt();
                  //System.out.println("locFlags: " + Integer.toBinaryString(locFlags));
                  if ((locFlags & 0x01) != 0) {
                      //System.out.println("Available local");
                  }
                  if ((locFlags & 0x02) != 0) {
                      //System.err.println("Available on network path");
                  }
  
                  // Get the local volume and local system values
                  in.skipBytes(4); // TODO: see above for structure
  
                  int localSysOff = in.readInt();
                  //System.out.println("localSysOff: " + localSysOff);
                  in.skipBytes(localSysOff - 20);  // Relative to start of chunk
  
                  byte[] pathBytes = new byte[tableLen - localSysOff - 1];
                  in.readFully(pathBytes, 0, pathBytes.length);
                  String path = new String(pathBytes, 0, pathBytes.length - 1);
                  /*
                  ByteArrayOutputStream bytes = new ByteArrayOutputStream();
                  byte read;
                  // Read bytes until the null (0) character
                  while (true) {
                      read = in.readByte();
                      if (read == 0) {
                          break;
                      }
                      bytes.write(read & 0xff);
                  }
  
                  String path = new String(bytes.toByteArray(), 0, bytes.size());
                  //*/
  
                  // Recurse to end of link chain
                  // TODO: This may cause endless loop if cyclic chain...
                  //System.out.println("path: \"" + path + "\"");
                  try {
                      result = parse(new File(path));
                  }
                  catch (StackOverflowError e) {
                      throw new IOException("Cannot resolve cyclic link: " + e.getMessage());
                  }
              }
  
              if ((flags & FLAG_DESC_STRING) != 0) {
                  // Description String present, skip it.
                  //System.out.println("Description String present");
  
                  // The string length is the first word which must also be skipped.
                  int descLen = in.readShort();
                  //System.out.println("descLen: " + descLen);
  
                  byte[] descBytes = new byte[descLen];
                  in.readFully(descBytes, 0, descLen);
  
                  //String desc = new String(descBytes, 0, descLen);
                  //System.out.println("desc: " + desc);
              }
  
              if ((flags & FLAG_REL_PATH_STRING) != 0) {
                  // Relative Path String present
                  //System.out.println("Relative Path String present");
  
                  // The string length is the first word which must also be skipped.
                  int pathLen = in.readShort();
                  //System.out.println("pathLen: " + pathLen);
  
                  byte[] pathBytes = new byte[pathLen];
                  in.readFully(pathBytes, 0, pathLen);
  
                  String path = new String(pathBytes, 0, pathLen);
  
                  // TODO: This may cause endless loop if cyclic chain...
                  //System.out.println("path: \"" + path + "\"");
                  if (result == pPath) {
                      try {
                          result = parse(new File(pPath.getParentFile(), path));
                      }
                      catch (StackOverflowError e) {
                          throw new IOException("Cannot resolve cyclic link: " + e.getMessage());
                      }
                  }
              }
  
              if ((flags & FLAG_WORKING_DIRECTORY) != 0) {
                  //System.out.println("Working Directory present");
              }
              if ((flags & FLAG_COMMAND_LINE_ARGS) != 0) {
                  //System.out.println("Command Line Arguments present");
                  // NOTE: This means this .lnk is not a folder, don't follow
                  result = pPath;
              }
              if ((flags & FLAG_ICON_FILENAME) != 0) {
                  //System.out.println("Icon Filename present");
              }
              if ((flags & FLAG_ADDITIONAL_INFO) != 0) {
                  //System.out.println("Additional Info present");
              }
          }
          finally {
              in.close();
          }
  
          return result;
      }