Detailed Method Reference

Namespace: Canley.Utility.CSV
Class: CanleyCSVManager

LoadFromFilePath

public bool LoadFromFilePath(string path)
  • Description: Loads a CSV from the local disk, supporting both simple filenames and absolute paths.

  • Workflow:

    1. Path Detection: Checks if the string is a full path; if not, it automatically targets Application.persistentDataPath.
    2. Validation: Verifies File.Exists() before attempting to read to prevent runtime exceptions.
    3. Execution: Reads the raw text and initiates the parsing sequence via ParseRawData().
  • Parameters:

    • path: A full absolute path or a simple filename (e.g., “save_data.csv”).
  • Returns: booltrue if the file was found and loaded.

  • Example:

// Targets Application.persistentDataPath/SaveGame.csv
csvManager.LoadFromFilePath("SaveGame.csv");

TIP

This is the preferred method for loading user-generated content or saved games on mobile devices.