This is an utility class for performing file operations on a device.
Namespace: Zebra.Sdk.DeviceAssembly: SdkApi.Core (in SdkApi.Core.dll) Version: 3.0.3271
Syntax public interface FileUtil
Public Interface FileUtil
public interface class FileUtil
The FileUtil type exposes the following members.
Methods Example using System;
using Zebra.Sdk.Comm;
using Zebra.Sdk.Device;
using Zebra.Sdk.Printer;
public class FileUtilExample {
public static void Main(string[] args) {
Connection connection = new TcpConnection("192.168.1.100", TcpConnection.DEFAULT_ZPL_TCP_PORT);
try {
connection.Open();
ZebraPrinter printer = ZebraPrinterFactory.GetInstance(connection);
printer.SendFileContents("C:\\Users\\[user]\\Documents\\labels\\sample.lbl");
string[] fileNames = printer.RetrieveFileNames();
foreach (string filename in fileNames) {
Console.WriteLine(filename);
}
} catch (ConnectionException e) {
Console.WriteLine(e.ToString());
} catch (ZebraPrinterLanguageUnknownException e) {
Console.WriteLine(e.ToString());
} catch (ZebraIllegalArgumentException e) {
Console.WriteLine(e.ToString());
} finally {
connection.Close();
}
}
}
See Also