Using %Library.File

Manage files and directories with the %Library.File class in InterSystems IRIS.

Updated Feb 2, 2026
One-click install
npx skills add https://github.com/sorodriguezz/skills-objectscript --skill using-library-file
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Using %Library.File
Source: https://github.com/sorodriguezz/skills-objectscript/tree/main/skills/using-library-file
Command: npx skills add https://github.com/sorodriguezz/skills-objectscript --skill using-library-file

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive guide to interacting with the file system, enabling users to manage files and directories programmatically within their environment.

Core Features & Use Cases

  • File and Directory Management: Create, delete, copy, rename, and query files and directories.
  • Attribute and Permission Handling: View and modify file and directory attributes and permissions.
  • Path Manipulation: Normalize, construct, and deconstruct file paths.
  • Use Case: Automate the organization of log files by creating timestamped directories, moving specific files into them, and setting appropriate read/write permissions.

Quick Start

Use the Using %Library.File skill to list the contents of the current directory.

Frequently Asked Questions about Using %Library.File

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list directory contents and check file existence in ObjectScript?

To list directory contents and check file existence in ObjectScript, use the %Library.File class in InterSystems IRIS, which provides methods to query files and directories programmatically. It also returns detailed drive information for the specified paths.

Can I manage file permissions and attributes programmatically within InterSystems IRIS?

Yes, you can manage file permissions and attributes programmatically within InterSystems IRIS by using the %Library.File class to view and modify read/write settings for files and directories. This allows you to control access levels directly from your code.

What is the best way to normalize and manipulate file paths in InterSystems IRIS?

The best way to normalize and manipulate file paths in InterSystems IRIS is by using the %Library.File class to construct and deconstruct file paths. This ensures your path strings are correctly formatted and consistent across different operating systems.

How do I create, copy, delete, and rename directories using ObjectScript?

To create, copy, delete, and rename directories using ObjectScript, utilize the %Library.File class in InterSystems IRIS. It provides comprehensive directory operations, enabling you to automate file system organization like moving log files into timestamped folders.

Does the %Library.File class require any external dependencies to perform filesystem operations?

No, the %Library.File class does not require external dependencies to perform filesystem operations in InterSystems IRIS. It is a built-in class that handles file and directory management, path manipulation, and attribute querying natively.