@ahmic/autoit-js
Version: 
Node.js bindings for AutoItX3.dll
42 lines (41 loc) • 1.43 kB
TypeScript
/**
 * Retrieves the network share associated with a local drive letter.
 *
 * @param device The local drive letter to query.
 * @param characterCount The maximum number of characters to retrieve (default is 1024).
 *
 * @returns The network share associated with the local drive letter, or an empty string if not found.
 *
 * @example
 * ```typescript
 * import { DriveMapGetSync } from '@ahmic/autoit-js';
 *
 * const networkShare = DriveMapGetSync('Z:');
 *
 * console.log(networkShare); // Output: "\\server\share"
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/DriveMapGet.htm
 */
export declare function DriveMapGetSync(device: string, characterCount?: number): string;
/**
 * Retrieves the network share associated with a local drive letter.
 *
 * @param device The local drive letter to query.
 * @param characterCount The maximum number of characters to retrieve (default is 1024).
 *
 * @returns A promise that resolves to the network share associated with the local drive letter, or an empty
 * string if not found.
 *
 * @example
 * ```typescript
 * import { DriveMapGet } from '@ahmic/autoit-js';
 *
 * const networkShare = DriveMapGet('Z:');
 *
 * console.log(networkShare); // Output: "\\server\share"
 * ```
 *
 * @see https://www.autoitscript.com/autoit3/docs/functions/DriveMapGet.htm
 */
export declare function DriveMapGet(device: string, characterCount?: number): Promise<string>;