Skip to content

kymacat/AppFilesViewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AppDirectoryViewer

iOS application for browsing device file system through a web interface. Allows running a local HTTP server to access device files from any browser on the local network.

📋 Features

  • Local HTTP server running on port 80
  • Web interface for navigating iOS device file system
  • File and folder tree display with icons and metadata
  • File downloading through browser
  • Disk usage statistics

Main Components

1. TCPServer (TCPServer/TCPServer.swift)

Core server module implementing TCP server with multithreading support.

Key methods:

  • start() - starts server on specified port
  • stop() - stops the server

🔄 Server Lifecycle

  1. Initialization: Socket creation and parameter setup
  2. Binding: Binding socket to port
  3. Listening: Starting to listen for incoming connections
  4. Accepting connections: Asynchronously accepting new clients
  5. Processing requests: Handling client data in separate threads
  6. Termination: Proper socket closure on stop

2. HTTPFileManagerHandler (HTTPFileManager/HTTPFileManagerHandler.swift)

HTTP request handler for file system operations.

Key methods:

  • handle(data:) - processes incoming HTTP requests

3. FileSystemHTMLGenerator (HTTPFileManager/FileSystemHTMLGenerator.swift)

HTML page generator for file system visualization.

Key methods:

  • generateHTML() - generates main HTML page

4. StartServerViewController (StartServerViewController.swift)

Main application screen with UI for server management.

5. Helper Modules

  • TCPServerHandling - protocol for server handlers
  • TCPServerResponse - server response structure
  • LogHandler - simple handler for logging
  • Locked - property wrapper for thread-safe access
  • Device+getIPAddress - extension for getting device IP address

Usage

  1. Build and run the project on simulator or device.
  2. Tap "Start Server" button
  3. The app will display server IP address (e.g., 192.168.1.100:80)
  4. Open browser on any device in the same network
  5. Navigate to the address shown in the app
  6. Use web interface to browse file system

About

iOS application for browsing device file system through a web interface. Allows running a local HTTP server to access device files from any browser on the local network.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors