network.access: Check Whether Path is a Network Path

View source: R/network_access.R

network.accessR Documentation

Check Whether Path is a Network Path

Description

Validates whether a path is a network (UNC) path and whether it is accessible.

Usage

network.access(path)

Arguments

path

Character string. Network path to validate.

Value

A list of class network_access_result containing:

  • path - Input path

  • network_path - TRUE/FALSE

  • server - Server name extracted from UNC path

  • share - Share name extracted from UNC path

  • accessible - TRUE/FALSE

  • status - Overall status message

Examples

# A local path is not a network path
result <- network.access(tempdir())
print(result)

# Parse a UNC path structure (no network needed — just parsing)
result <- network.access("//myserver/myshare/data")
print(result)


# Real UNC network path (requires actual network access)
network.access("//server/share/data")



fileaccess documentation built on June 18, 2026, 1:06 a.m.